summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-09-15 15:54:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-09-16 08:30:26 +0000
commita2b77b43685884fb4e9be04152a49294fa50db36 (patch)
tree00d599e81a653dc5c663f9dd179970b3e6aa11f2 /cui/source
parent389939b02bde4ea72268960310bbd1f2984200bf (diff)
loplugin:singlevalfields in basic..idl
Also fix obvious bug in the initialisation of the connectivity::odbc::OConnection::m_bClosed field. Probably closes some kind of connection leak there. Change-Id: I04579cf91bcd6d6c51c697d83971da4142743a82 Reviewed-on: https://gerrit.libreoffice.org/28932 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/customize/macropg.cxx4
-rw-r--r--cui/source/dialogs/scriptdlg.cxx2
-rw-r--r--cui/source/inc/cuitabarea.hxx3
-rw-r--r--cui/source/inc/numpages.hxx3
-rw-r--r--cui/source/inc/scriptdlg.hxx1
-rw-r--r--cui/source/tabpages/numpages.cxx29
-rw-r--r--cui/source/tabpages/tpcolor.cxx19
7 files changed, 11 insertions, 50 deletions
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 781f3443ea8e..718d59e9be81 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -443,7 +443,6 @@ class IconLBoxString : public SvLBoxString
{
Image* m_pMacroImg;
Image* m_pComponentImg;
- int m_nxImageOffset;
public:
IconLBoxString( const OUString& sText, Image* pMacroImg, Image* pComponentImg );
@@ -458,7 +457,6 @@ IconLBoxString::IconLBoxString( const OUString& sText,
, m_pMacroImg( pMacroImg )
, m_pComponentImg( pComponentImg )
{
- m_nxImageOffset = 20;
}
@@ -486,7 +484,7 @@ void IconLBoxString::Paint(const Point& aPos, SvTreeListBox& /*aDevice*/, vcl::R
}
Point aPnt(aPos);
- aPnt.X() += m_nxImageOffset;
+ aPnt.X() += 20;
rRenderContext.DrawText(aPnt, aPureMethod);
}
}
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 3cceae8a9a74..554a9dc0103c 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -90,8 +90,6 @@ SFTreeListBox::SFTreeListBox(vcl::Window* pParent)
WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HIDESELECTION |
WB_HASLINES | WB_HASLINESATROOT | WB_TABSTOP );
SetNodeDefaultImages();
-
- nMode = 0xFF; // everything
}
VCL_BUILDER_FACTORY(SFTreeListBox)
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 77244c35e06a..7486f7a1f066 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -702,7 +702,6 @@ enum class ColorModel
CMYK // can be extend with more models, e.g. HSV
};
-struct SvxColorTabPageShadow;
class SvxColorTabPage : public SfxTabPage
{
using TabPage::ActivatePage;
@@ -713,8 +712,6 @@ private:
VclPtr<Window> mpTopDlg;
- SvxColorTabPageShadow *pShadow;
-
PaletteManager maPaletteManager;
VclPtr<ListBox> m_pSelectPalette;
VclPtr<SvxColorValueSet> m_pValSetColorList;
diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index 83401e460c7b..6b7e70b771c3 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -44,9 +44,8 @@ class SvxNumberingPreview : public vcl::Window
const SvxNumRule* pActNum;
vcl::Font aStdFont;
long nPageWidth;
- const OUString* pOutlineNames;
bool bPosition;
- sal_uInt16 nActLevel;
+ sal_uInt16 nActLevel;
protected:
virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override;
diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx
index 94732fcf6d9f..428d6d831170 100644
--- a/cui/source/inc/scriptdlg.hxx
+++ b/cui/source/inc/scriptdlg.hxx
@@ -47,7 +47,6 @@ class SFTreeListBox : public SvTreeListBox
{
friend class SvxScriptOrgDialog;
private:
- sal_uInt16 nMode;
Image m_hdImage;
Image m_libImage;
Image m_macImage;
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 59e5d892c188..b971d05839ca 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2369,7 +2369,6 @@ SvxNumberingPreview::SvxNumberingPreview(vcl::Window* pParent, WinBits nWinBits)
: Window(pParent, nWinBits)
, pActNum(nullptr)
, nPageWidth(0)
- , pOutlineNames(nullptr)
, bPosition(false)
, nActLevel(SAL_MAX_UINT16)
{
@@ -2633,30 +2632,20 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectan
nTextOffset = nTextOffset + nXStep;
nPreNum++;
}
- if (pOutlineNames)
+ //#i5153# the selected rectangle(s) should be black
+ if (0 != (nActLevel & (1<<nLevel)))
{
- //#i5153# outline numberings still use the style names as text
- pVDev->SetFont(aStdFont);
- sMsg = pOutlineNames[nLevel];
- pVDev->DrawText(Point(nXStart + nTextOffset, nYStart), sMsg);
+ pVDev->SetFillColor( aBlackColor );
+ pVDev->SetLineColor( aBlackColor );
}
else
{
- //#i5153# the selected rectangle(s) should be black
- if (0 != (nActLevel & (1<<nLevel)))
- {
- pVDev->SetFillColor( aBlackColor );
- pVDev->SetLineColor( aBlackColor );
- }
- else
- {
- //#i5153# unselected levels are gray
- pVDev->SetFillColor( aLineColor );
- pVDev->SetLineColor( aLineColor );
- }
- Rectangle aRect1(Point(nXStart + nTextOffset, nYStart + nTopOffset), Size(nWidth, nRectHeight));
- pVDev->DrawRect(aRect1);
+ //#i5153# unselected levels are gray
+ pVDev->SetFillColor( aLineColor );
+ pVDev->SetLineColor( aLineColor );
}
+ Rectangle aRect1(Point(nXStart + nTextOffset, nYStart + nTopOffset), Size(nWidth, nRectHeight));
+ pVDev->DrawRect(aRect1);
}
}
}
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index c2428bfbc27c..870854f7c428 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -52,27 +52,10 @@
using namespace com::sun::star;
-struct SvxColorTabPageShadow
-{
- PageType nUnknownType;
- sal_Int32 nUnknownPos;
- bool bIsAreaTP;
- ChangeType nChangeType;
- SvxColorTabPageShadow()
- : nUnknownType( PageType::Unknown )
- , nUnknownPos( LISTBOX_ENTRY_NOTFOUND )
- , bIsAreaTP( false )
- , nChangeType( ChangeType::NONE )
- {
- }
-};
-
-
SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, const SfxItemSet& rInAttrs)
: SfxTabPage(pParent, "ColorPage", "cui/ui/colorpage.ui", &rInAttrs)
, meType( XPropertyListType::Color )
, mpTopDlg( GetParentDialog() )
- , pShadow ( new SvxColorTabPageShadow() )
, rOutAttrs ( rInAttrs )
// All the horrific pointers we store and should not
, pnColorListState( nullptr )
@@ -188,8 +171,6 @@ SvxColorTabPage::~SvxColorTabPage()
void SvxColorTabPage::dispose()
{
- delete pShadow;
- pShadow = nullptr;
mpTopDlg.clear();
m_pSelectPalette.clear();
m_pValSetColorList.clear();