[Libreoffice-commits] core.git: compilerplugins/clang cppcanvas/source cui/source include/cppcanvas

Noel Grandin noel.grandin at collabora.co.uk
Sat Jul 22 12:05:17 UTC 2017


 compilerplugins/clang/unusedfields.readonly.results |   10 ----------
 cppcanvas/source/mtfrenderer/implrenderer.cxx       |    5 +----
 cui/source/inc/cuitabarea.hxx                       |    4 ----
 cui/source/inc/numpages.hxx                         |    1 -
 cui/source/tabpages/macroass.cxx                    |    8 +++-----
 cui/source/tabpages/numpages.cxx                    |   13 +------------
 cui/source/tabpages/tabarea.cxx                     |    5 ++---
 cui/source/tabpages/tpcolor.cxx                     |    3 +--
 include/cppcanvas/renderer.hxx                      |    3 ---
 9 files changed, 8 insertions(+), 44 deletions(-)

New commits:
commit 939f9bd0b502ab5dc240be0c6f334becb1c944c8
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri Jul 21 12:56:37 2017 +0200

    loplugin:unusedfields in cppcanvas..cui
    
    Change-Id: I1cf1f7919e03d863c6f7756e1caf3b9313777479
    Reviewed-on: https://gerrit.libreoffice.org/40294
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/unusedfields.readonly.results b/compilerplugins/clang/unusedfields.readonly.results
index cd0e14d13418..fafa2d3a0c7d 100644
--- a/compilerplugins/clang/unusedfields.readonly.results
+++ b/compilerplugins/clang/unusedfields.readonly.results
@@ -184,12 +184,6 @@ cui/source/inc/autocdlg.hxx:229
     StringChangeList aNewEntries DoubleStringArray
 cui/source/inc/autocdlg.hxx:230
     StringChangeList aDeletedEntries DoubleStringArray
-cui/source/inc/cuitabarea.hxx:125
-    SvxAreaTabDialog mnPageType enum PageType
-cui/source/inc/cuitabarea.hxx:659
-    SvxColorTabPage meType enum XPropertyListType
-cui/source/inc/numpages.hxx:49
-    SvxNumberingPreview nPageWidth long
 cui/source/inc/numpages.hxx:166
     SvxNumPickTabPage aNumSettingsArrays SvxNumSettingsArr_Impl [16]
 cui/source/inc/swpossizetabpage.hxx:77
@@ -198,8 +192,6 @@ cui/source/options/optcolor.cxx:257
     ColorConfigWindow_Impl aModuleOptions class SvtModuleOptions
 cui/source/options/optpath.cxx:79
     OptPath_Impl m_aDefOpt class SvtDefaultOptions
-cui/source/tabpages/macroass.cxx:59
-    SfxMacroTabPage_Impl bReadOnly _Bool
 dbaccess/source/core/api/RowSetBase.hxx:76
     dbaccess::ORowSetBase m_aModuleClient class dbaccess::OModuleClient
 dbaccess/source/core/dataaccess/ModelImpl.hxx:168
@@ -534,8 +526,6 @@ include/connectivity/DriversConfig.hxx:76
     connectivity::DriversConfig m_aNode connectivity::DriversConfig::OSharedConfigNode
 include/connectivity/sdbcx/VDescriptor.hxx:56
     connectivity::sdbcx::ODescriptor m_aCase comphelper::UStringMixEqual
-include/cppcanvas/renderer.hxx:131
-    cppcanvas::Renderer::Parameters maFontProportion ::boost::optional<sal_Int8>
 include/drawinglayer/primitive2d/textlayoutdevice.hxx:61
     drawinglayer::primitive2d::TextLayouterDevice maSolarGuard class SolarMutexGuard
 include/editeng/brushitem.hxx:53
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 95b431e09322..a72629edc8b7 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -774,8 +774,6 @@ namespace cppcanvas
                 *rParms.mrParms.maFontLetterForm :
                 (rFont.GetItalic() == ITALIC_NONE) ? 0 : 9;
             aFontRequest.FontDescription.FontDescription.Proportion =
-                rParms.mrParms.maFontProportion.is_initialized() ?
-                *rParms.mrParms.maFontProportion :
                 (rFont.GetPitch() == PITCH_FIXED)
                     ? rendering::PanoseProportion::MONO_SPACED
                     : rendering::PanoseProportion::ANYTHING;
@@ -2970,8 +2968,7 @@ namespace cppcanvas
             if( rParams.maFontName.is_initialized() ||
                 rParams.maFontWeight.is_initialized() ||
                 rParams.maFontLetterForm.is_initialized() ||
-                rParams.maFontUnderline.is_initialized() ||
-                rParams.maFontProportion.is_initialized() )
+                rParams.maFontUnderline.is_initialized() )
             {
                 ::cppcanvas::internal::OutDevState& rState = aStateStack.getState();
 
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 6b0cd7309254..2f6befc45d3b 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -122,8 +122,6 @@ private:
     ChangeType          mnGradientListState;
     ChangeType          mnHatchingListState;
 
-    PageType            mnPageType;
-
     virtual void        PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override;
 
 protected:
@@ -656,8 +654,6 @@ class SvxColorTabPage : public SfxTabPage
     using TabPage::DeactivatePage;
 
 private:
-    XPropertyListType   meType;
-
     VclPtr<Window>             mpTopDlg;
 
     PaletteManager             maPaletteManager;
diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index 025300b9964b..7b12d8d00879 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -48,7 +48,6 @@ class SvxNumberingPreview : public vcl::Window
 {
     const SvxNumRule*   pActNum;
     vcl::Font           aStdFont;
-    long                nPageWidth;
     bool                bPosition;
     sal_uInt16          nActLevel;
 
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index 9c176a9ae989..79c0fcd6f64c 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -55,7 +55,6 @@ public:
     VclPtr<VclFrame>                       pMacroFrame;
     VclPtr<SfxConfigFunctionListBox>       pMacroLB;
 
-    bool                            bReadOnly;
     Idle                            maFillGroupIdle;
     bool                            bGotEvents;
     bool m_bDummyActivated; ///< has this tab page already been activated
@@ -69,7 +68,6 @@ SfxMacroTabPage_Impl::SfxMacroTabPage_Impl()
     , pGroupLB(nullptr)
     , pMacroFrame(nullptr)
     , pMacroLB(nullptr)
-    , bReadOnly(false)
     , bGotEvents(false)
     , m_bDummyActivated(false)
 {
@@ -120,12 +118,12 @@ void SfxMacroTabPage::EnableButtons()
     {
         // get bound macro
         const SvxMacro* pM = aTbl.Get( (sal_uInt16)reinterpret_cast<sal_uLong>(pE->GetUserData()) );
-        mpImpl->pDeletePB->Enable( nullptr != pM && !mpImpl->bReadOnly );
+        mpImpl->pDeletePB->Enable( nullptr != pM );
 
         OUString sEventMacro = static_cast<const SvLBoxString&>(pE->GetItem( LB_MACROS_ITEMPOS )).GetText();
 
         OUString sScriptURI = mpImpl->pMacroLB->GetSelectedScriptURI();
-        mpImpl->pAssignPB->Enable( !mpImpl->bReadOnly && !sScriptURI.equalsIgnoreAsciiCase( sEventMacro ) );
+        mpImpl->pAssignPB->Enable( !sScriptURI.equalsIgnoreAsciiCase( sEventMacro ) );
     }
     else
         mpImpl->pAssignPB->Enable( false );
@@ -270,7 +268,7 @@ void SfxMacroTabPage::Reset( const SfxItemSet* rSet )
 
 bool SfxMacroTabPage::IsReadOnly() const
 {
-    return mpImpl->bReadOnly;
+    return false;
 }
 
 IMPL_LINK_NOARG( SfxMacroTabPage, SelectEvent_Impl, SvTreeListBox*, void)
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 03e39ec27b7b..24d60aa85c14 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2337,7 +2337,6 @@ static sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev,
 SvxNumberingPreview::SvxNumberingPreview(vcl::Window* pParent, WinBits nWinBits)
     : Window(pParent, nWinBits)
     , pActNum(nullptr)
-    , nPageWidth(0)
     , bPosition(false)
     , nActLevel(SAL_MAX_UINT16)
 {
@@ -2368,17 +2367,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
 
     if (pActNum)
     {
-        sal_uInt16 nWidthRelation;
-        if (nPageWidth)
-        {
-            nWidthRelation = sal_uInt16 (nPageWidth / aSize.Width());
-            if (bPosition)
-                nWidthRelation = nWidthRelation * 2 / 3;
-            else
-                nWidthRelation = nWidthRelation / 4;
-        }
-        else
-            nWidthRelation = 30; // chapter dialog
+        sal_uInt16 nWidthRelation = 30; // chapter dialog
 
         // height per level
         sal_uInt16 nXStep = sal::static_int_cast<sal_uInt16>(aSize.Width() / (3 * pActNum->GetLevelCount()));
diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx
index 9676abbf774b..5ee18ede6045 100644
--- a/cui/source/tabpages/tabarea.cxx
+++ b/cui/source/tabpages/tabarea.cxx
@@ -65,8 +65,7 @@ SvxAreaTabDialog::SvxAreaTabDialog
     mnBitmapListState ( ChangeType::NONE ),
     mnPatternListState ( ChangeType::NONE ),
     mnGradientListState ( ChangeType::NONE ),
-    mnHatchingListState ( ChangeType::NONE ),
-    mnPageType( PageType::Area )
+    mnHatchingListState ( ChangeType::NONE )
 {
     m_nAreaTabPage = AddTabPage( "RID_SVXPAGE_AREA", SvxAreaTabPage::Create, nullptr );
 
@@ -261,7 +260,7 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
     }
     else if (nId == m_nTransparenceTabPage)
     {
-            static_cast<SvxTransparenceTabPage&>(rPage).SetPageType( mnPageType );
+            static_cast<SvxTransparenceTabPage&>(rPage).SetPageType( PageType::Area );
             static_cast<SvxTransparenceTabPage&>(rPage).SetDlgType( 0 );
     }
 }
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 3518c9daea0d..3735ced06a89 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -56,7 +56,6 @@ using namespace com::sun::star;
 
 SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, const SfxItemSet& rInAttrs)
     : SfxTabPage(pParent, "ColorPage", "cui/ui/colorpage.ui", &rInAttrs)
-    , meType( XPropertyListType::Color )
     , mpTopDlg( GetParentDialog() )
     , rOutAttrs           ( rInAttrs )
     // All the horrific pointers we store and should not
@@ -485,7 +484,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, SelectPaletteLBHdl, ListBox&, void)
     {
         XColorListRef pList = XPropertyList::AsColorList(
                                 XPropertyList::CreatePropertyListFromURL(
-                                meType, maPaletteManager.GetSelectedPalettePath()));
+                                XPropertyListType::Color, maPaletteManager.GetSelectedPalettePath()));
         pList->SetName(maPaletteManager.GetPaletteName());
         if(pList->Load())
         {
diff --git a/include/cppcanvas/renderer.hxx b/include/cppcanvas/renderer.hxx
index 908c3d278d28..51b5085ca455 100644
--- a/include/cppcanvas/renderer.hxx
+++ b/include/cppcanvas/renderer.hxx
@@ -127,9 +127,6 @@ namespace cppcanvas
             /// Optionally forces the given font letter form (italics etc.) for all text actions
             ::boost::optional< sal_Int8 >                   maFontLetterForm;
 
-            /// Optionally forces the given font proportion (condensed, monospaced etc.) for all text actions
-            ::boost::optional< sal_Int8 >                   maFontProportion;
-
             /// Optionally forces underlining for all text actions
             ::boost::optional< bool >                       maFontUnderline;
         };


More information about the Libreoffice-commits mailing list