[Libreoffice-commits] core.git: chart2/inc chart2/source include/filter include/sfx2 include/unotools sc/inc sc/source sd/source sfx2/source svx/source unotools/source vcl/inc vcl/source

Noel Grandin noel.grandin at collabora.co.uk
Wed Mar 29 06:42:52 UTC 2017


 chart2/inc/ChartModel.hxx                               |    1 
 chart2/source/model/main/ChartModel.cxx                 |    3 
 include/filter/msfilter/svdfppt.hxx                     |    2 
 include/sfx2/viewfrm.hxx                                |    1 
 include/unotools/localedatawrapper.hxx                  |    5 -
 sc/inc/funcdesc.hxx                                     |    3 
 sc/source/core/data/funcdesc.cxx                        |   42 ++-------
 sc/source/core/tool/addincol.cxx                        |    1 
 sc/source/ui/dialogs/searchresults.cxx                  |    3 
 sc/source/ui/formdlg/dwfunctr.cxx                       |   13 +--
 sc/source/ui/inc/output.hxx                             |    1 
 sc/source/ui/unoobj/appluno.cxx                         |   13 +--
 sc/source/ui/view/output.cxx                            |    3 
 sd/source/filter/ppt/pptin.cxx                          |    1 
 sd/source/ui/dlg/docprev.cxx                            |   25 +----
 sd/source/ui/inc/docprev.hxx                            |    7 -
 sd/source/ui/remotecontrol/BluetoothServer.cxx          |    6 -
 sfx2/source/appl/appcfg.cxx                             |    3 
 sfx2/source/doc/objserv.cxx                             |    2 
 sfx2/source/doc/objstor.cxx                             |    1 
 sfx2/source/doc/objxtor.cxx                             |    1 
 sfx2/source/inc/objshimp.hxx                            |    1 
 sfx2/source/view/impviewframe.hxx                       |    2 
 sfx2/source/view/viewfrm.cxx                            |   26 ------
 svx/source/accessibility/svxrectctaccessiblecontext.cxx |   68 ++++------------
 svx/source/inc/svxrectctaccessiblecontext.hxx           |    3 
 unotools/source/i18n/localedatawrapper.cxx              |    2 
 vcl/inc/window.h                                        |    1 
 vcl/source/app/svapp.cxx                                |    3 
 vcl/source/window/window.cxx                            |    1 
 30 files changed, 55 insertions(+), 189 deletions(-)

New commits:
commit 5a725d1fde7381ef9c02afcb639235a11e52182c
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue Mar 28 15:27:36 2017 +0200

    loplugin:singlevalfields
    
    Change-Id: I7f05903aaab9b0b274358243d680d0c30694ae61
    Reviewed-on: https://gerrit.libreoffice.org/35804
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/chart2/inc/ChartModel.hxx b/chart2/inc/ChartModel.hxx
index 04e3be2b6ee3..29b764b6c546 100644
--- a/chart2/inc/ChartModel.hxx
+++ b/chart2/inc/ChartModel.hxx
@@ -476,7 +476,6 @@ public:
 private:
     sal_Int32 mnStart;
     sal_Int32 mnEnd;
-    bool bSet;
 #if HAVE_FEATURE_OPENGL
     VclPtr<OpenGLWindow> mpOpenGLWindow;
 #endif
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index fe8ada3639d0..814bd315928b 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -109,7 +109,6 @@ ChartModel::ChartModel(uno::Reference<uno::XComponentContext > const & xContext)
                 "com.sun.star.xml.NamespaceMap", "com.sun.star.comp.chart.XMLNameSpaceMap" ), uno::UNO_QUERY)
     , mnStart(0)
     , mnEnd(0)
-    , bSet(false)
 #if HAVE_FEATURE_OPENGL
     , mpOpenGLWindow(nullptr)
 #endif
@@ -154,7 +153,6 @@ ChartModel::ChartModel( const ChartModel & rOther )
     , m_xInternalDataProvider( rOther.m_xInternalDataProvider )
     , mnStart(rOther.mnStart)
     , mnEnd(rOther.mnEnd)
-    , bSet(false)
 #if HAVE_FEATURE_OPENGL
     , mpOpenGLWindow(nullptr)
 #endif
@@ -1322,7 +1320,6 @@ OUString SAL_CALL ChartModel::dump()
 
 void ChartModel::setTimeBasedRange(sal_Int32 nStart, sal_Int32 nEnd)
 {
-    bSet = false;
     mnStart = nStart;
     mnEnd = nEnd;
     mbTimeBased = true;
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index 8a77b3d4d444..f0a78072b3d8 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -112,8 +112,6 @@ struct SdHyperlinkEntry
     OUString    aTarget;
     OUString    aSubAdress;
 
-    sal_Int32   nStartPos;
-
     OUString    aConvSubString;
 };
 
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index 83928d364170..9a79f3587d11 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -195,7 +195,6 @@ public:
 
     SAL_DLLPRIVATE void MakeActive_Impl( bool bActivate );
     SAL_DLLPRIVATE const Size& GetMargin_Impl() const;
-    SAL_DLLPRIVATE SfxViewFrame* GetActiveChildFrame_Impl() const;
     SAL_DLLPRIVATE OUString GetActualPresentationURL_Impl() const;
     SAL_DLLPRIVATE void MiscExec_Impl(SfxRequest &);
     SAL_DLLPRIVATE void MiscState_Impl(SfxItemSet &);
diff --git a/include/unotools/localedatawrapper.hxx b/include/unotools/localedatawrapper.hxx
index 02ec91526245..fce96406ab7d 100644
--- a/include/unotools/localedatawrapper.hxx
+++ b/include/unotools/localedatawrapper.hxx
@@ -83,9 +83,6 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper
     };
     mutable std::map<css::lang::Locale, css::i18n::LocaleDataItem, Locale_Compare> maDataItemCache;
 
-    // dummies, to be implemented or provided by XML locale data
-    sal_Unicode                 cCurrZeroChar;
-
                                 // whenever Locale changes
     void                invalidateData();
 
@@ -287,7 +284,7 @@ public:
 
     // dummy returns, to be implemented
     sal_Unicode         getCurrZeroChar() const
-                                    { return cCurrZeroChar; }
+                                    { return '0'; }
     static bool         isNumLeadingZero()
                                     { return true; }
                                 /// standard decimal places
diff --git a/sc/inc/funcdesc.hxx b/sc/inc/funcdesc.hxx
index 632ccf083d02..377f82ea8489 100644
--- a/sc/inc/funcdesc.hxx
+++ b/sc/inc/funcdesc.hxx
@@ -206,9 +206,8 @@ public:
     struct ParameterFlags
     {
         bool    bOptional   :1;     /**< Parameter is optional */
-        bool    bSuppress   :1;     /**< Suppress parameter in UI because not implemented yet */
 
-        ParameterFlags() : bOptional(false), bSuppress(false) {}
+        ParameterFlags() : bOptional(false) {}
     };
 
     OUString      *pFuncName;              /**< Function name */
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index d745eaaf63ea..9767265331dd 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -149,17 +149,12 @@ OUString ScFuncDesc::GetParamList() const
             sal_uInt16 nLastAdded = nArgCount;
             for ( sal_uInt16 i=0; i<nArgCount; i++ )
             {
-                if (pDefArgFlags[i].bSuppress)
-                    nLastSuppressed = i;
-                else
+                nLastAdded = i;
+                aSig.append(maDefArgNames[i]);
+                if ( i != nArgCount-1 )
                 {
-                    nLastAdded = i;
-                    aSig.append(maDefArgNames[i]);
-                    if ( i != nArgCount-1 )
-                    {
-                        aSig.append(sep);
-                        aSig.append( " " );
-                    }
+                    aSig.append(sep);
+                    aSig.append( " " );
                 }
             }
             // If only suppressed parameters follow the last added parameter,
@@ -172,12 +167,9 @@ OUString ScFuncDesc::GetParamList() const
         {
             for ( sal_uInt16 nArg = 0; nArg < nVarArgsStart; nArg++ )
             {
-                if (!pDefArgFlags[nArg].bSuppress)
-                {
-                    aSig.append(maDefArgNames[nArg]);
-                    aSig.append(sep);
-                    aSig.append( " " );
-                }
+                aSig.append(maDefArgNames[nArg]);
+                aSig.append(sep);
+                aSig.append( " " );
             }
             /* NOTE: Currently there are no suppressed var args parameters. If
              * there were, we'd have to cope with it here and above for the fix
@@ -196,12 +188,9 @@ OUString ScFuncDesc::GetParamList() const
         {
             for ( sal_uInt16 nArg = 0; nArg < nVarArgsStart; nArg++ )
             {
-                if (!pDefArgFlags[nArg].bSuppress)
-                {
-                    aSig.append(maDefArgNames[nArg]);
-                    aSig.append(sep);
-                    aSig.append( " " );
-                }
+                aSig.append(maDefArgNames[nArg]);
+                aSig.append(sep);
+                aSig.append( " " );
             }
 
             aSig.append(maDefArgNames[nVarArgsStart]);
@@ -289,11 +278,6 @@ sal_uInt16 ScFuncDesc::GetSuppressedArgCount() const
     else if (nArgs >= VAR_ARGS)
         nArgs -= VAR_ARGS - 1;
     sal_uInt16 nCount = nArgs;
-    for (sal_uInt16 i=0; i < nArgs; ++i)
-    {
-        if (pDefArgFlags[i].bSuppress)
-            --nCount;
-    }
     if (nArgCount >= PAIRED_VAR_ARGS)
         nCount += PAIRED_VAR_ARGS - 2;
     else if (nArgCount >= VAR_ARGS)
@@ -346,8 +330,7 @@ void ScFuncDesc::fillVisibleArgumentMapping(::std::vector<sal_uInt16>& _rArgumen
         nArgs -= VAR_ARGS - 1;
     for (sal_uInt16 i=0; i < nArgs; ++i)
     {
-        if (!pDefArgFlags || !pDefArgFlags[i].bSuppress)
-            _rArguments.push_back(i);
+        _rArguments.push_back(i);
     }
 }
 
@@ -907,7 +890,6 @@ ScFunctionList::ScFunctionList()
             for (sal_uInt16 j = 0; j < nArgs; ++j)
             {
                 pDesc->pDefArgFlags[j].bOptional = false;
-                pDesc->pDefArgFlags[j].bSuppress = false;
                 pLegacyFuncData->getParamDesc( aArgName, aArgDesc, j+1 );
                 if ( !aArgName.isEmpty() )
                     pDesc->maDefArgNames[j] = aArgName;
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index 1c84db07678e..6878753deed6 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -1266,7 +1266,6 @@ bool ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncData& r
             rDesc.maDefArgNames[nArg] = pArgs[nArg].aName;
             rDesc.maDefArgDescs[nArg] = pArgs[nArg].aDescription;
             rDesc.pDefArgFlags[nArg].bOptional = pArgs[nArg].bOptional;
-            rDesc.pDefArgFlags[nArg].bSuppress = false;
 
             // no empty names...
             if ( rDesc.maDefArgNames[nArg].isEmpty() )
diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx
index 897c8ecae6c5..111e39c98f7e 100644
--- a/sc/source/ui/dialogs/searchresults.cxx
+++ b/sc/source/ui/dialogs/searchresults.cxx
@@ -57,7 +57,7 @@ namespace
 {
     class ListWrapper {
         size_t mnCount;
-        const size_t mnMaximum;
+        static const size_t mnMaximum = 1000;
         OUStringBuffer maName;
         VclPtr<FixedText> mpLabel;
         VclPtr<SvSimpleTable> mpList;
@@ -65,7 +65,6 @@ namespace
         ListWrapper(const VclPtr<SvSimpleTable> &pList,
                     const VclPtr<FixedText> &pLabel) :
             mnCount(0),
-            mnMaximum(1000),
             mpLabel(pLabel),
             mpList(pList)
         {
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index 020fd44ed3f3..63362f29078f 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -330,14 +330,11 @@ void ScFunctionWin::DoEnter()
                     for ( sal_uInt16 nArg = 1;
                             nArg < nFix && !pDesc->pDefArgFlags[nArg].bOptional; nArg++ )
                     {
-                        if (!pDesc->pDefArgFlags[nArg].bSuppress)
-                        {
-                            aArgStr += aArgSep;
-                            OUString sTmp = pDesc->maDefArgNames[nArg];
-                            sTmp = comphelper::string::strip(sTmp, ' ');
-                            sTmp = sTmp.replaceAll(" ", "_");
-                            aArgStr += sTmp;
-                        }
+                        aArgStr += aArgSep;
+                        OUString sTmp = pDesc->maDefArgNames[nArg];
+                        sTmp = comphelper::string::strip(sTmp, ' ');
+                        sTmp = sTmp.replaceAll(" ", "_");
+                        aArgStr += sTmp;
                     }
                 }
             }
diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index a5eaad917660..8012790c2376 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -179,7 +179,6 @@ private:
     SCROW nEditRow;
 
     bool bMetaFile;             // Output to metafile (not pixels!)
-    bool bSingleGrid;           // beim Gitter bChanged auswerten
 
     bool bPagebreakMode;        // Page break preview
     bool bSolidBackground;      // white instead of transparant
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index 4904d755e110..1f66a019abc7 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -561,14 +561,11 @@ static void lcl_FillSequence( uno::Sequence<beans::PropertyValue>& rSequence, co
             sheet::FunctionArgument* pArgAry = aArgSeq.getArray();
             for (sal_uInt16 i=0, j=0; i<nCount; i++)
             {
-                if (!rDesc.pDefArgFlags[i].bSuppress)
-                {
-                    sheet::FunctionArgument aArgument;
-                    aArgument.Name        = rDesc.maDefArgNames[i];
-                    aArgument.Description = rDesc.maDefArgDescs[i];
-                    aArgument.IsOptional  = rDesc.pDefArgFlags[i].bOptional;
-                    pArgAry[j++] = aArgument;
-                }
+                sheet::FunctionArgument aArgument;
+                aArgument.Name        = rDesc.maDefArgNames[i];
+                aArgument.Description = rDesc.maDefArgDescs[i];
+                aArgument.IsOptional  = rDesc.pDefArgFlags[i].bOptional;
+                pArgAry[j++] = aArgument;
             }
             pArray[4].Value <<= aArgSeq;
         }
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 78cd2b7f29b0..c7ffa95b37d8 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -170,7 +170,6 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType,
     nEditCol( 0 ),
     nEditRow( 0 ),
     bMetaFile( false ),
-    bSingleGrid( false ),
     bPagebreakMode( false ),
     bSolidBackground( false ),
     mbUseStyleColor( false ),
@@ -420,7 +419,7 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
             bool bDraw = bGrid || nBreakOld != ScBreakType::NONE; // simple grid only if set that way
 
             sal_uInt16 nWidthXplus2 = pRowInfo[0].pCellInfo[nXplus2].nWidth;
-            bSingle = bSingleGrid; //! get into Fillinfo !!!!!
+            bSingle = false; //! get into Fillinfo !!!!!
             if ( nX<MAXCOL && !bSingle )
             {
                 bSingle = ( nWidthXplus2 == 0 );
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index be6fd0f9ed18..35995897fa88 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -420,7 +420,6 @@ bool ImplSdPPTImport::Import()
 
                                         if ( !aPropItem.Read( pHyperlink->aSubAdress ) )
                                             break;
-                                        pHyperlink->nStartPos = -1;
 
                                         if ( !pHyperlink->aSubAdress.isEmpty() ) // get the converted subaddress
                                         {
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index 6efc4a9f826b..d757d4bfb322 100644
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -53,7 +53,7 @@ const int SdDocPreviewWin::FRAME = 4;
 VCL_BUILDER_FACTORY_CONSTRUCTOR(SdDocPreviewWin, 0)
 
 SdDocPreviewWin::SdDocPreviewWin( vcl::Window* pParent, const WinBits nStyle )
-: Control(pParent, nStyle), pMetaFile( nullptr )
+: Control(pParent, nStyle)
 {
     SetBorderStyle( WindowBorderStyle::MONO );
     svtools::ColorConfig aColorConfig;
@@ -73,8 +73,6 @@ void SdDocPreviewWin::dispose()
         mxSlideShow->end();
         mxSlideShow.clear();
     }
-    delete pMetaFile;
-    pMetaFile = nullptr;
     Control::dispose();
 }
 
@@ -90,15 +88,14 @@ void SdDocPreviewWin::Resize()
         mxSlideShow->resize( GetSizePixel() );
 }
 
-void SdDocPreviewWin::CalcSizeAndPos( GDIMetaFile* pFile, Size& rSize, Point& rPoint )
+void SdDocPreviewWin::CalcSizeAndPos( Size& rSize, Point& rPoint )
 {
-    Size aTmpSize = pFile ? pFile->GetPrefSize() : Size(1,1 );
     long nWidth = rSize.Width() - 2*FRAME;
     long nHeight = rSize.Height() - 2*FRAME;
     if( nWidth < 0 ) nWidth = 0;
     if( nHeight < 0 ) nHeight = 0;
 
-    double dRatio=((double)aTmpSize.Width())/aTmpSize.Height();
+    double dRatio = 1;
     double dRatioPreV = nHeight ? (((double) nWidth ) / nHeight) : 0.0;
 
     if (dRatio > dRatioPreV)
@@ -113,12 +110,12 @@ void SdDocPreviewWin::CalcSizeAndPos( GDIMetaFile* pFile, Size& rSize, Point& rP
     }
 }
 
-void SdDocPreviewWin::ImpPaint( GDIMetaFile* pFile, OutputDevice* pVDev )
+void SdDocPreviewWin::ImpPaint( OutputDevice* pVDev )
 {
     Point aPoint;
     Size aSize = pVDev->GetOutputSize();
     Point bPoint(aSize.Width()-2*FRAME, aSize.Height()-2*FRAME );
-    CalcSizeAndPos( pFile, aSize, aPoint );
+    CalcSizeAndPos( aSize, aPoint );
     bPoint -= aPoint;
     aPoint += Point( FRAME, FRAME );
 
@@ -127,13 +124,6 @@ void SdDocPreviewWin::ImpPaint( GDIMetaFile* pFile, OutputDevice* pVDev )
     pVDev->SetLineColor();
     pVDev->SetFillColor( Color( aColorConfig.GetColorValue( svtools::APPBACKGROUND ).nColor ) );
     pVDev->DrawRect(Rectangle( Point(0,0 ), pVDev->GetOutputSize()));
-    if( pFile )
-    {
-        pVDev->SetFillColor( maDocumentColor );
-        pVDev->DrawRect(Rectangle(aPoint, aSize));
-        pFile->WindStart();
-        pFile->Play( pVDev, aPoint, aSize  );
-    }
 }
 
 void SdDocPreviewWin::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect )
@@ -146,7 +136,7 @@ void SdDocPreviewWin::Paint( vcl::RenderContext& /*rRenderContext*/, const Recta
             ? ::sd::OUTPUT_DRAWMODE_CONTRAST
             : ::sd::OUTPUT_DRAWMODE_COLOR );
 
-        ImpPaint( pMetaFile, this );
+        ImpPaint( this );
     }
     else
     {
@@ -185,9 +175,6 @@ void SdDocPreviewWin::updateViewSettings()
         maDocumentColor = Color( aColorConfig.GetColorValue( svtools::DOCCOLOR ).nColor );
     }
 
-    delete pMetaFile;
-    pMetaFile = nullptr;
-
     Invalidate();
 }
 
diff --git a/sd/source/ui/inc/docprev.hxx b/sd/source/ui/inc/docprev.hxx
index 2fe0e851da5a..51f55abc8631 100644
--- a/sd/source/ui/inc/docprev.hxx
+++ b/sd/source/ui/inc/docprev.hxx
@@ -36,20 +36,17 @@ namespace sd {
     class SlideShow;
 }
 
-class GDIMetaFile;
-
 class SD_DLLPUBLIC SdDocPreviewWin : public Control, public SfxListener
 {
 protected:
-    GDIMetaFile*    pMetaFile;
     Link<SdDocPreviewWin&,void> aClickHdl;
     Color           maDocumentColor;
     rtl::Reference< sd::SlideShow > mxSlideShow;
 
     virtual void    Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override;
     virtual Size    GetOptimalSize() const override;
-    static void     CalcSizeAndPos( GDIMetaFile* pFile, Size& rSize, Point& rPoint );
-    void            ImpPaint( GDIMetaFile* pFile, OutputDevice* pVDev );
+    static void     CalcSizeAndPos( Size& rSize, Point& rPoint );
+    static void     ImpPaint( OutputDevice* pVDev );
 
     static const int FRAME;
 
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index 9662e6135ce5..bf68261e95e1 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -93,7 +93,6 @@ struct sd::BluetoothServer::Impl {
     GMainContext *mpContext;
     DBusConnection *mpConnection;
     DBusObject *mpService;
-    volatile bool mbExitMainloop;
     enum BluezVersion { BLUEZ4, BLUEZ5, UNKNOWN };
     BluezVersion maBluezVersion;
 
@@ -101,7 +100,6 @@ struct sd::BluetoothServer::Impl {
         : mpContext( g_main_context_new() )
         , mpConnection( nullptr )
         , mpService( nullptr )
-        , mbExitMainloop( false )
         , maBluezVersion( UNKNOWN )
     { }
 
@@ -1204,7 +1202,7 @@ void SAL_CALL BluetoothServer::run()
 
         // TODO: exit on SD deinit
         // Probably best to do that in SdModule::~SdModule?
-        while (!mpImpl->mbExitMainloop)
+        while (true)
         {
             aDBusFD.revents = 0;
             g_main_context_iteration( mpImpl->mpContext, TRUE );
@@ -1244,7 +1242,7 @@ void SAL_CALL BluetoothServer::run()
 
     mpImpl->mpConnection = pConnection;
 
-    while( !mpImpl->mbExitMainloop )
+    while( true )
     {
         aDBusFD.revents = 0;
         aSocketFD.revents = 0;
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 0f1b1bb8ebb2..873c1c5a4539 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -498,8 +498,7 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
         while ( pCurrViewFrame )
         {
             // update all "final" dispatchers
-            if ( !pCurrViewFrame->GetActiveChildFrame_Impl() )
-                pCurrViewFrame->GetDispatcher()->Update_Impl(true);
+            pCurrViewFrame->GetDispatcher()->Update_Impl(true);
             pCurrViewFrame = SfxViewFrame::GetNext(*pCurrViewFrame);
         }
     }
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index e357c82533c6..c2bdb2e5281a 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1442,8 +1442,6 @@ void SfxObjectShell::ImplSign( bool bScriptingContent )
             else
                 pImpl->nDocumentSignatureState = SignatureState::UNKNOWN;// Re-Check
 
-            pImpl->bSignatureErrorIsShown = false;
-
             Invalidate( SID_SIGNATURE );
             Invalidate( SID_MACRO_SIGNATURE );
             Broadcast( SfxHint(SfxHintId::TitleChanged) );
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 3266f5d4ac95..72eeba95925b 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2059,7 +2059,6 @@ bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed, bool bRegisterRecent )
             pImpl->nDocumentSignatureState = SignatureState::NOSIGNATURES;
             pImpl->nScriptingSignatureState = pNewMed->GetCachedSignatureState_Impl();
             OSL_ENSURE( pImpl->nScriptingSignatureState != SignatureState::BROKEN, "The signature must not be broken at this place" );
-            pImpl->bSignatureErrorIsShown = false;
 
             // TODO/LATER: in future the medium must control own signature state, not the document
             pNewMed->SetCachedSignatureState_Impl( SignatureState::NOSIGNATURES ); // set the default value back
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 5cd1609c6457..4e097f91b471 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -224,7 +224,6 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
     ,bIsPrintJobCancelable( true )
     ,bOwnsStorage( true )
     ,bInitialized( false )
-    ,bSignatureErrorIsShown( false )
     ,bModelInitialized( false )
     ,bPreserveVersions( true )
     ,m_bMacroSignBroken( false )
diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx
index 916d306caaf2..dc0624253094 100644
--- a/sfx2/source/inc/objshimp.hxx
+++ b/sfx2/source/inc/objshimp.hxx
@@ -83,7 +83,6 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
                         bIsPrintJobCancelable :1, // Stampit disable/enable cancel button for print jobs ... default = true = enable!
                         bOwnsStorage:1,
                         bInitialized:1,
-                        bSignatureErrorIsShown:1,
                         bModelInitialized:1, // whether the related model is initialized
                         bPreserveVersions:1,
                         m_bMacroSignBroken:1, // whether the macro signature was explicitly broken
diff --git a/sfx2/source/view/impviewframe.hxx b/sfx2/source/view/impviewframe.hxx
index 1ef39b8b4a19..63ba1ddd2999 100644
--- a/sfx2/source/view/impviewframe.hxx
+++ b/sfx2/source/view/impviewframe.hxx
@@ -35,7 +35,6 @@ struct SfxViewFrame_Impl
     OUString            aActualURL;
     SfxFrame&           rFrame;
     VclPtr<vcl::Window> pWindow;
-    SfxViewFrame*       pActiveChild;
     VclPtr<vcl::Window> pFocusWin;
     sal_uInt16          nDocViewNo;
     SfxInterfaceId      nCurViewId;
@@ -52,7 +51,6 @@ struct SfxViewFrame_Impl
     explicit SfxViewFrame_Impl(SfxFrame& i_rFrame)
         : rFrame(i_rFrame)
         , pWindow(nullptr)
-        , pActiveChild(nullptr)
         , pFocusWin(nullptr)
         , nDocViewNo(0)
         , nCurViewId(0)
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index fc9b4329c339..5179d4f4ecbe 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -254,24 +254,6 @@ static bool AskPasswordToModify_Impl( const uno::Reference< task::XInteractionHa
 
 void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
 {
-    if ( rReq.GetSlot() == SID_RELOAD )
-    {
-        // When CTRL-Reload, reload the active Frame
-        SfxViewFrame* pActFrame = this;
-        while ( pActFrame )
-            pActFrame = pActFrame->GetActiveChildFrame_Impl();
-
-        if ( pActFrame )
-        {
-            sal_uInt16 nModifier = rReq.GetModifier();
-            if ( nModifier & KEY_MOD1 )
-            {
-                pActFrame->ExecReload_Impl( rReq );
-                return;
-            }
-        }
-    }
-
     SfxObjectShell* pSh = GetObjectShell();
     switch ( rReq.GetSlot() )
     {
@@ -985,7 +967,6 @@ void SfxViewFrame::ReleaseObjectShell_Impl()
     GetFrame().ReleasingComponent_Impl();
     if ( GetWindow().HasChildPathFocus( true ) )
     {
-        DBG_ASSERT( !GetActiveChildFrame_Impl(), "Wrong active child frame!" );
         GetWindow().GrabFocus();
     }
 
@@ -1324,7 +1305,6 @@ void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh )
     m_pImpl->bResizeInToOut = true;
     m_pImpl->bObjLocked = false;
     m_pImpl->pFocusWin = nullptr;
-    m_pImpl->pActiveChild = nullptr;
     m_pImpl->nCurViewId = SfxInterfaceId(0);
     m_pImpl->bReloading = false;
     m_pImpl->bIsDowning = false;
@@ -1701,12 +1681,6 @@ const Size& SfxViewFrame::GetMargin_Impl() const
     return m_pImpl->aMargin;
 }
 
-SfxViewFrame* SfxViewFrame::GetActiveChildFrame_Impl() const
-{
-    SfxViewFrame *pViewFrame = m_pImpl->pActiveChild;
-    return pViewFrame;
-}
-
 SfxViewFrame* SfxViewFrame::LoadViewIntoFrame_Impl_NoThrow( const SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rFrame,
                                                    const SfxInterfaceId i_nViewId, const bool i_bHidden )
 {
diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
index d38a9a099005..3b9eb4300370 100644
--- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
@@ -64,22 +64,9 @@ namespace
 }
 
 
-static const ChildIndexToPointData* IndexToPoint( long nIndex, bool bAngleControl )
-{
-    DBG_ASSERT( nIndex < ( bAngleControl? 8 : 9 ) && nIndex >= 0, "-IndexToPoint(): invalid child index! You have been warned..." );
-
-    // angles are counted reverse counter clock wise
-    static const ChildIndexToPointData  pAngleData[] =
-    {                                                   // index
-        {   RID_SVXSTR_RECTCTL_ACC_CHLD_A000,   RID_SVXSTR_RECTCTL_ACC_CHLD_A000,   RectPoint::RM },    //  0
-        {   RID_SVXSTR_RECTCTL_ACC_CHLD_A045,   RID_SVXSTR_RECTCTL_ACC_CHLD_A045,   RectPoint::RT },    //  1
-        {   RID_SVXSTR_RECTCTL_ACC_CHLD_A090,   RID_SVXSTR_RECTCTL_ACC_CHLD_A090,   RectPoint::MT },    //  2
-        {   RID_SVXSTR_RECTCTL_ACC_CHLD_A135,   RID_SVXSTR_RECTCTL_ACC_CHLD_A135,   RectPoint::LT },    //  3
-        {   RID_SVXSTR_RECTCTL_ACC_CHLD_A180,   RID_SVXSTR_RECTCTL_ACC_CHLD_A180,   RectPoint::LM },    //  4
-        {   RID_SVXSTR_RECTCTL_ACC_CHLD_A225,   RID_SVXSTR_RECTCTL_ACC_CHLD_A225,   RectPoint::LB },    //  5
-        {   RID_SVXSTR_RECTCTL_ACC_CHLD_A270,   RID_SVXSTR_RECTCTL_ACC_CHLD_A270,   RectPoint::MB },    //  6
-        {   RID_SVXSTR_RECTCTL_ACC_CHLD_A315,   RID_SVXSTR_RECTCTL_ACC_CHLD_A315,   RectPoint::RB }     //  7
-    };
+static const ChildIndexToPointData* IndexToPoint( long nIndex )
+{
+    DBG_ASSERT( nIndex < 9 && nIndex >= 0, "-IndexToPoint(): invalid child index! You have been warned..." );
 
     // corners are counted from left to right and top to bottom
     static const ChildIndexToPointData  pCornerData[] =
@@ -95,37 +82,19 @@ static const ChildIndexToPointData* IndexToPoint( long nIndex, bool bAngleContro
         {   RID_SVXSTR_RECTCTL_ACC_CHLD_RB, RID_SVXSTR_RECTCTL_ACC_CHLD_RB, RectPoint::RB }     //  8
     };
 
-    return ( bAngleControl? pAngleData : pCornerData ) + nIndex;
+    return pCornerData + nIndex;
 }
 
 
-static long PointToIndex( RectPoint ePoint, bool bAngleControl )
+static long PointToIndex( RectPoint ePoint )
 {
     long    nRet( (long) ePoint );
-    if( bAngleControl )
-    {   // angle control
-        // angles are counted reverse counter clock wise
-        switch( ePoint )
-        {
-            case RectPoint::LT: nRet = 3;               break;
-            case RectPoint::MT: nRet = 2;               break;
-            case RectPoint::RT: nRet = 1;               break;
-            case RectPoint::LM: nRet = 4;               break;
-            case RectPoint::MM: nRet = NOCHILDSELECTED; break;
-            case RectPoint::RM: nRet = 0;               break;
-            case RectPoint::LB: nRet = 5;               break;
-            case RectPoint::MB: nRet = 6;               break;
-            case RectPoint::RB: nRet = 7;               break;
-        }
-    }
-    else
-    {   // corner control
-        // corners are counted from left to right and top to bottom
-        DBG_ASSERT( (int)RectPoint::LT == 0 && (int)RectPoint::MT == 1 && (int)RectPoint::RT == 2 && (int)RectPoint::LM == 3 && (int)RectPoint::MM == 4 && (int)RectPoint::RM == 5 &&
-                    (int)RectPoint::LB == 6 && (int)RectPoint::MB == 7 && (int)RectPoint::RB == 8, "*PointToIndex(): unexpected enum value!" );
+    // corner control
+    // corners are counted from left to right and top to bottom
+    DBG_ASSERT( (int)RectPoint::LT == 0 && (int)RectPoint::MT == 1 && (int)RectPoint::RT == 2 && (int)RectPoint::LM == 3 && (int)RectPoint::MM == 4 && (int)RectPoint::RM == 5 &&
+                (int)RectPoint::LB == 6 && (int)RectPoint::MB == 7 && (int)RectPoint::RB == 8, "*PointToIndex(): unexpected enum value!" );
 
-        nRet = ( long ) ePoint;
-    }
+    nRet = ( long ) ePoint;
 
     return nRet;
 }
@@ -140,13 +109,12 @@ SvxRectCtlAccessibleContext::SvxRectCtlAccessibleContext(
     mpRepr( &rRepr ),
     mpChildren( nullptr ),
     mnClientId( 0 ),
-    mnSelectedChild( NOCHILDSELECTED ),
-    mbAngleMode( false )
+    mnSelectedChild( NOCHILDSELECTED )
 {
     {
         ::SolarMutexGuard aSolarGuard;
-        msName = SVX_RESSTR( mbAngleMode? RID_SVXSTR_RECTCTL_ACC_ANGL_NAME : RID_SVXSTR_RECTCTL_ACC_CORN_NAME );
-        msDescription = SVX_RESSTR( mbAngleMode? RID_SVXSTR_RECTCTL_ACC_ANGL_DESCR : RID_SVXSTR_RECTCTL_ACC_CORN_DESCR );
+        msName = SVX_RESSTR( RID_SVXSTR_RECTCTL_ACC_CORN_NAME );
+        msDescription = SVX_RESSTR( RID_SVXSTR_RECTCTL_ACC_CORN_DESCR );
     }
 
     mpChildren = new SvxRectCtlChildAccessibleContext*[ MAX_NUM_OF_CHILDREN ];
@@ -189,7 +157,7 @@ Reference< XAccessible > SAL_CALL SvxRectCtlAccessibleContext::getAccessibleAtPo
 
     Reference< XAccessible >    xRet;
 
-    long                        nChild = PointToIndex( mpRepr->GetApproxRPFromPixPt( rPoint ), mbAngleMode );
+    long                        nChild = PointToIndex( mpRepr->GetApproxRPFromPixPt( rPoint ) );
 
     if( nChild != NOCHILDSELECTED )
         xRet = getAccessibleChild( nChild );
@@ -257,7 +225,7 @@ Reference< XAccessible > SAL_CALL SvxRectCtlAccessibleContext::getAccessibleChil
 
         if( !xChild.is() )
         {
-            const ChildIndexToPointData*    p = IndexToPoint( nIndex, mbAngleMode );
+            const ChildIndexToPointData*    p = IndexToPoint( nIndex );
             OUString aName(SVX_RESSTR(p->nResIdName));
             OUString aDescr(SVX_RESSTR(p->nResIdDescr));
 
@@ -482,7 +450,7 @@ void SAL_CALL SvxRectCtlAccessibleContext::selectAccessibleChild( sal_Int32 nInd
 
     ThrowExceptionIfNotAlive();
 
-    const ChildIndexToPointData*    pData = IndexToPoint( nIndex, mbAngleMode );
+    const ChildIndexToPointData*    pData = IndexToPoint( nIndex );
 
     DBG_ASSERT( pData,
         "SvxRectCtlAccessibleContext::selectAccessibleChild(): this is an impossible state! Or at least should be..." );
@@ -549,7 +517,7 @@ void SvxRectCtlAccessibleContext::checkChildIndex( long nIndex )
 void SvxRectCtlAccessibleContext::FireChildFocus( RectPoint eButton )
 {
     ::osl::MutexGuard   aGuard( m_aMutex );
-    long nNew = PointToIndex( eButton, mbAngleMode );
+    long nNew = PointToIndex( eButton );
     long nNumOfChildren = getAccessibleChildCount();
     if( nNew < nNumOfChildren )
     {
@@ -611,7 +579,7 @@ void SvxRectCtlAccessibleContext::selectChild( long nNew )
 void SvxRectCtlAccessibleContext::selectChild(RectPoint eButton )
 {
     // no guard -> is done in next selectChild
-    selectChild(PointToIndex( eButton, mbAngleMode ));
+    selectChild(PointToIndex( eButton ));
 }
 
 void SAL_CALL SvxRectCtlAccessibleContext::disposing()
diff --git a/svx/source/inc/svxrectctaccessiblecontext.hxx b/svx/source/inc/svxrectctaccessiblecontext.hxx
index ea375908995c..7238478c269d 100644
--- a/svx/source/inc/svxrectctaccessiblecontext.hxx
+++ b/svx/source/inc/svxrectctaccessiblecontext.hxx
@@ -262,9 +262,6 @@ private:
 
     /// actual selected child
     long                                mnSelectedChild;
-
-    /// mode of control (true -> 8 points, false -> 9 points)
-    bool                            mbAngleMode;
 };
 
 inline bool SvxRectCtlAccessibleContext::IsAlive() const
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx
index 142f685984fb..db93ea18c1d5 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -157,8 +157,6 @@ void LocaleDataWrapper::invalidateData()
         aGrouping[0] = 0;
     if (aDateAcceptancePatterns.getLength())
         aDateAcceptancePatterns = Sequence<OUString>();
-    // dummies
-    cCurrZeroChar = '0';
 }
 
 /* FIXME-BCP47: locale data should provide a language tag instead that could be
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 7c4d116ffa58..6553b18eb40c 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -134,7 +134,6 @@ struct ImplFrameData
     sal_uInt16          mnFirstMouseCode;       //< mouse code by mousebuttondown
     sal_uInt16          mnMouseCode;            //< mouse code
     MouseEventModifiers mnMouseMode;            //< mouse mode
-    MapUnit             meMapUnit;              //< last MapUnit for LogicUnitToPixel
     bool                mbHasFocus;             //< focus
     bool                mbInMouseMove;          //< is MouseMove on stack
     bool                mbMouseIn;              //> is Mouse inside the frame
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 409953bf42d5..1dc3e6012036 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -723,9 +723,6 @@ void Application::SetSettings( const AllSettings& rSettings )
             vcl::Window* pFrame = pFirstFrame;
             while ( pFrame )
             {
-                // restore AppFont cache data
-                pFrame->mpWindowImpl->mpFrameData->meMapUnit = MapUnit::MapPixel;
-
                 // call UpdateSettings from ClientWindow in order to prevent updating data twice
                 vcl::Window* pClientWin = pFrame;
                 while ( pClientWin->ImplGetClientWindow() )
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 70b77446f7a2..848fdc942b43 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -803,7 +803,6 @@ ImplFrameData::ImplFrameData( vcl::Window *pWindow )
     mnFirstMouseCode   = 0;
     mnMouseCode        = 0;
     mnMouseMode        = MouseEventModifiers::NONE;
-    meMapUnit          = MapUnit::MapPixel;
     mbHasFocus         = false;
     mbInMouseMove      = false;
     mbMouseIn          = false;


More information about the Libreoffice-commits mailing list