[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source vcl/unx vcl/workben
Noel Grandin
noel.grandin at collabora.co.uk
Thu May 17 06:41:59 UTC 2018
include/vcl/commandevent.hxx | 5 -
include/vcl/pdfwriter.hxx | 23 --------
include/vcl/ppdparser.hxx | 9 ---
vcl/inc/octree.hxx | 1
vcl/inc/unx/cpdmgr.hxx | 8 --
vcl/inc/unx/glyphcache.hxx | 1
vcl/inc/unx/i18n_xkb.hxx | 2
vcl/source/filter/FilterConfigCache.cxx | 9 +--
vcl/source/filter/FilterConfigCache.hxx | 1
vcl/source/gdi/octree.cxx | 4 -
vcl/source/gdi/pdfwriter.cxx | 11 ----
vcl/source/gdi/textlayout.cxx | 7 +-
vcl/source/window/commandevent.cxx | 5 -
vcl/source/window/winproc.cxx | 6 +-
vcl/unx/generic/app/i18n_xkb.cxx | 15 ++---
vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 4 -
vcl/unx/generic/printer/ppdparser.cxx | 67 +++++++++----------------
vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 7 +-
vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx | 1
vcl/workben/vcldemo.cxx | 16 ++---
20 files changed, 59 insertions(+), 143 deletions(-)
New commits:
commit 2e3f5a1e2aad2ff9866d7a782a04bec7c29c0e43
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Wed May 16 09:29:07 2018 +0200
loplugin:unusedfields in vcl
Change-Id: Id0913b209b089e3c66a7e449e31f8d5d5b1b4f83
Reviewed-on: https://gerrit.libreoffice.org/54413
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/vcl/commandevent.hxx b/include/vcl/commandevent.hxx
index 6c752ffccaa4..703741051205 100644
--- a/include/vcl/commandevent.hxx
+++ b/include/vcl/commandevent.hxx
@@ -117,11 +117,6 @@ public:
class VCL_DLLPUBLIC CommandInputContextData
{
-private:
- LanguageType meLanguage;
-
-public:
- CommandInputContextData( LanguageType eLang );
};
enum class CommandWheelMode
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index 1ff79089c64c..3c9afafc8180 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -541,29 +541,6 @@ The following structure describes the permissions used in PDF security
DrawColor, DrawGreyscale
};
- /// Holds all information to be able to fill a PDF signature template.
- struct VCL_DLLPUBLIC PDFSignContext
- {
- /// DER-encoded certificate buffer.
- sal_Int8* m_pDerEncoded;
- /// Length of m_pDerEncoded.
- sal_Int32 m_nDerEncoded;
- /// Bytes before the signature itself.
- void* m_pByteRange1;
- /// Length of m_pByteRange1.
- sal_Int32 m_nByteRange1;
- /// Bytes after the signature itself.
- void* m_pByteRange2;
- /// Length of m_pByteRange2.
- sal_Int32 m_nByteRange2;
- OUString m_aSignTSA;
- OUString m_aSignPassword;
- /// The signature (in PKCS#7 format) is written into this buffer.
- OStringBuffer& m_rCMSHexBuffer;
-
- PDFSignContext(OStringBuffer& rCMSHexBuffer);
- };
-
struct PDFWriterContext
{
/* must be a valid file: URL usable by osl */
diff --git a/include/vcl/ppdparser.hxx b/include/vcl/ppdparser.hxx
index 7cffed146ea7..78f47417ae84 100644
--- a/include/vcl/ppdparser.hxx
+++ b/include/vcl/ppdparser.hxx
@@ -143,9 +143,6 @@ private:
value_type m_aOrderedKeys;
::std::vector< PPDConstraint > m_aConstraints;
- // some identifying fields
- OUString m_aPrinterName;
- OUString m_aNickName;
// the full path of the PPD file
OUString m_aFile;
// some basic attributes
@@ -157,20 +154,14 @@ private:
// shortcuts to important keys and their default values
// imageable area
- const PPDValue* m_pDefaultImageableArea;
const PPDKey* m_pImageableAreas;
// paper dimensions
const PPDValue* m_pDefaultPaperDimension;
const PPDKey* m_pPaperDimensions;
// paper trays
const PPDValue* m_pDefaultInputSlot;
- const PPDKey* m_pInputSlots;
// resolutions
const PPDValue* m_pDefaultResolution;
- const PPDKey* m_pResolutions;
-
- // fonts
- const PPDKey* m_pFontList;
// translations
std::unique_ptr<PPDTranslator> m_pTranslator;
diff --git a/vcl/inc/octree.hxx b/vcl/inc/octree.hxx
index 729a61255552..41a34987d40f 100644
--- a/vcl/inc/octree.hxx
+++ b/vcl/inc/octree.hxx
@@ -54,7 +54,6 @@ private:
BitmapPalette aPal;
- sal_uLong nMax;
sal_uLong nLeafCount;
sal_uLong nLevel;
NODE* pTree;
diff --git a/vcl/inc/unx/cpdmgr.hxx b/vcl/inc/unx/cpdmgr.hxx
index 36ccc95221d7..12d6603bfc09 100644
--- a/vcl/inc/unx/cpdmgr.hxx
+++ b/vcl/inc/unx/cpdmgr.hxx
@@ -55,14 +55,6 @@ struct CPDPrinter
GDBusProxy* backend;
};
-struct CPDPrinterOption
-{
- OUString name;
- OUString default_value;
- int num_supported_values;
- std::vector<OUString> supported_values;
-};
-
class CPDManager : public PrinterInfoManager
{
#if ENABLE_DBUS && ENABLE_GIO
diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx
index 2340683c8c48..5e515db564b5 100644
--- a/vcl/inc/unx/glyphcache.hxx
+++ b/vcl/inc/unx/glyphcache.hxx
@@ -175,7 +175,6 @@ private:
long mnSin;
int mnWidth;
- int mnPrioEmbedded;
int mnPrioAntiAlias;
FreetypeFontInfo* mpFontInfo;
FT_Int mnLoadFlags;
diff --git a/vcl/inc/unx/i18n_xkb.hxx b/vcl/inc/unx/i18n_xkb.hxx
index d3641312f3da..77de6e837466 100644
--- a/vcl/inc/unx/i18n_xkb.hxx
+++ b/vcl/inc/unx/i18n_xkb.hxx
@@ -28,10 +28,8 @@ class VCLPLUG_GEN_PUBLIC SalI18N_KeyboardExtension
private:
bool mbUseExtension;
- sal_uInt32 mnDefaultGroup;
int mnEventBase;
int mnErrorBase;
- Display* mpDisplay;
public:
diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx
index bfa48d5edee3..369fc3989f04 100644
--- a/vcl/source/filter/FilterConfigCache.cxx
+++ b/vcl/source/filter/FilterConfigCache.cxx
@@ -293,12 +293,11 @@ void FilterConfigCache::ImplInitSmart()
}
}
-FilterConfigCache::FilterConfigCache( bool bConfig ) :
- bUseConfig ( bConfig )
+FilterConfigCache::FilterConfigCache( bool bConfig )
{
- if (bUseConfig)
- bUseConfig = !utl::ConfigManager::IsFuzzing();
- if (bUseConfig)
+ if (bConfig)
+ bConfig = !utl::ConfigManager::IsFuzzing();
+ if (bConfig)
ImplInit();
else
ImplInitSmart();
diff --git a/vcl/source/filter/FilterConfigCache.hxx b/vcl/source/filter/FilterConfigCache.hxx
index eb3221835769..70237afeba3e 100644
--- a/vcl/source/filter/FilterConfigCache.hxx
+++ b/vcl/source/filter/FilterConfigCache.hxx
@@ -58,7 +58,6 @@ class FilterConfigCache
std::vector< FilterConfigCacheEntry > aImport;
std::vector< FilterConfigCacheEntry > aExport;
- bool bUseConfig;
static bool bInitialized;
static sal_Int32 nIndType;
diff --git a/vcl/source/gdi/octree.cxx b/vcl/source/gdi/octree.cxx
index c7af47e71b1a..6947fc365405 100644
--- a/vcl/source/gdi/octree.cxx
+++ b/vcl/source/gdi/octree.cxx
@@ -53,14 +53,14 @@ ImpNodeCache::~ImpNodeCache()
}
Octree::Octree(const BitmapReadAccess& rReadAcc, sal_uLong nColors)
- : nMax(nColors)
- , nLeafCount(0)
+ : nLeafCount(0)
, nLevel(0)
, pTree(nullptr)
, pColor(nullptr)
, pAcc(&rReadAcc)
, nPalIndex(0)
{
+ sal_uLong nMax(nColors);
pNodeCache.reset( new ImpNodeCache( nColors ) );
memset( pReduce, 0, ( OCTREE_BITS + 1 ) * sizeof( NODE* ) );
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index e5899449d82f..dce2388cf35e 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -27,17 +27,6 @@ PDFWriter::AnyWidget::~AnyWidget()
{
}
-PDFWriter::PDFSignContext::PDFSignContext(OStringBuffer& rCMSHexBuffer)
- : m_pDerEncoded(nullptr),
- m_nDerEncoded(0),
- m_pByteRange1(nullptr),
- m_nByteRange1(0),
- m_pByteRange2(nullptr),
- m_nByteRange2(0),
- m_rCMSHexBuffer(rCMSHexBuffer)
-{
-}
-
PDFWriter::PDFWriter( const PDFWriter::PDFWriterContext& rContext, const css::uno::Reference< css::beans::XMaterialHolder >& xEnc )
:
xImplementation( new PDFWriterImpl( rContext, xEnc, *this ) )
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index f533e84c0ba1..eaecdd275d63 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -93,7 +93,6 @@ namespace vcl
OutputDevice& m_rTargetDevice;
OutputDevice& m_rReferenceDevice;
Font m_aUnzoomedPointFont;
- const Fraction m_aZoom;
const bool m_bRTLEnabled;
tools::Rectangle m_aCompleteTextRect;
@@ -104,9 +103,9 @@ namespace vcl
:m_rTargetDevice( _rTargetDevice )
,m_rReferenceDevice( _rReferenceDevice )
,m_aUnzoomedPointFont( _rControl.GetUnzoomedControlPointFont() )
- ,m_aZoom( _rControl.GetZoom() )
,m_bRTLEnabled( _rControl.IsRTLEnabled() )
{
+ const Fraction aZoom( _rControl.GetZoom() );
m_rTargetDevice.Push( PushFlags::MAPMODE | PushFlags::FONT | PushFlags::TEXTLAYOUTMODE );
MapMode aTargetMapMode( m_rTargetDevice.GetMapMode() );
@@ -116,8 +115,8 @@ namespace vcl
// between text in Writer and text in controls in Writer, though both have the same font.
// So, if we have a zoom set at the control, then we do not scale the font, but instead modify the map mode
// to accommodate for the zoom.
- aTargetMapMode.SetScaleX( m_aZoom ); // TODO: shouldn't this be "current_scale * zoom"?
- aTargetMapMode.SetScaleY( m_aZoom );
+ aTargetMapMode.SetScaleX( aZoom ); // TODO: shouldn't this be "current_scale * zoom"?
+ aTargetMapMode.SetScaleY( aZoom );
// also, use a higher-resolution map unit than "pixels", which should save us some rounding errors when
// translating coordinates between the reference device and the target device.
diff --git a/vcl/source/window/commandevent.cxx b/vcl/source/window/commandevent.cxx
index b298022abc56..c8b486e7fc59 100644
--- a/vcl/source/window/commandevent.cxx
+++ b/vcl/source/window/commandevent.cxx
@@ -55,11 +55,6 @@ CommandExtTextInputData::~CommandExtTextInputData()
{
}
-CommandInputContextData::CommandInputContextData( LanguageType eLang )
-{
- meLanguage = eLang;
-}
-
CommandWheelData::CommandWheelData()
{
mnDelta = 0;
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 72c518eeb6cb..77e11cb58097 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -1262,10 +1262,10 @@ static void ImplHandleExtTextInputPos( vcl::Window* pWindow,
= pChild != nullptr && pChild->GetInputContext().GetFont().IsVertical();
}
-static bool ImplHandleInputContextChange( vcl::Window* pWindow, LanguageType eNewLang )
+static bool ImplHandleInputContextChange( vcl::Window* pWindow )
{
vcl::Window* pChild = ImplGetKeyInputWindow( pWindow );
- CommandInputContextData aData( eNewLang );
+ CommandInputContextData aData;
return !ImplCallCommand( pChild, CommandEventId::InputContextChange, &aData );
}
@@ -2494,7 +2494,7 @@ bool ImplWindowFrameProc( vcl::Window* _pWindow, SalEvent nEvent, const void* pE
ImplHandleSalExtTextInputPos( pWindow, const_cast<SalExtTextInputPosEvent *>(static_cast<SalExtTextInputPosEvent const *>(pEvent)) );
break;
case SalEvent::InputContextChange:
- bRet = ImplHandleInputContextChange( pWindow, static_cast<SalInputContextChangeEvent const *>(pEvent)->meLanguage );
+ bRet = ImplHandleInputContextChange( pWindow );
break;
case SalEvent::ShowDialog:
{
diff --git a/vcl/unx/generic/app/i18n_xkb.cxx b/vcl/unx/generic/app/i18n_xkb.cxx
index 9f7e6c6c95b8..3c2d1a25fbba 100644
--- a/vcl/unx/generic/app/i18n_xkb.cxx
+++ b/vcl/unx/generic/app/i18n_xkb.cxx
@@ -27,11 +27,10 @@
SalI18N_KeyboardExtension::SalI18N_KeyboardExtension( Display* pDisplay )
: mbUseExtension(true)
- , mnDefaultGroup(0)
, mnEventBase(0)
, mnErrorBase(0)
- , mpDisplay(pDisplay)
{
+ sal_uInt32 nDefaultGroup = 0;
// allow user to set the default keyboard group idx or to disable the usage
// of x keyboard extension at all:
@@ -43,9 +42,9 @@ SalI18N_KeyboardExtension::SalI18N_KeyboardExtension( Display* pDisplay )
{
mbUseExtension = pUseKeyboardExtension[0] != '\0' ;
if ( mbUseExtension )
- mnDefaultGroup = strtol( pUseKeyboardExtension, nullptr, 0 );
- if ( mnDefaultGroup > XkbMaxKbdGroup )
- mnDefaultGroup = 0;
+ nDefaultGroup = strtol( pUseKeyboardExtension, nullptr, 0 );
+ if ( nDefaultGroup > XkbMaxKbdGroup )
+ nDefaultGroup = 0;
}
// query XServer support for XKB Extension,
@@ -57,7 +56,7 @@ SalI18N_KeyboardExtension::SalI18N_KeyboardExtension( Display* pDisplay )
int nExtMajorVersion = XkbMajorVersion;
int nExtMinorVersion = XkbMinorVersion;
- mbUseExtension = XkbQueryExtension( mpDisplay,
+ mbUseExtension = XkbQueryExtension( pDisplay,
&nMajorExtOpcode, &mnEventBase, &mnErrorBase,
&nExtMajorVersion, &nExtMinorVersion ) != 0;
}
@@ -68,7 +67,7 @@ SalI18N_KeyboardExtension::SalI18N_KeyboardExtension( Display* pDisplay )
#define XkbGroupMask ( XkbGroupStateMask | XkbGroupBaseMask \
| XkbGroupLatchMask | XkbGroupLockMask )
- mbUseExtension = XkbSelectEventDetails( mpDisplay,
+ mbUseExtension = XkbSelectEventDetails( pDisplay,
XkbUseCoreKbd, XkbStateNotify, XkbGroupMask, XkbGroupMask );
}
@@ -76,7 +75,7 @@ SalI18N_KeyboardExtension::SalI18N_KeyboardExtension( Display* pDisplay )
if ( mbUseExtension )
{
XkbStateRec aStateRecord;
- XkbGetState( mpDisplay, XkbUseCoreKbd, &aStateRecord );
+ XkbGetState( pDisplay, XkbUseCoreKbd, &aStateRecord );
}
}
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index 9bc310b67afd..5d7b9ff064ac 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -373,7 +373,6 @@ FreetypeFont::FreetypeFont( const FontSelectPattern& rFSD, FreetypeFontInfo* pFI
mpNextGCFont( nullptr ),
mnCos( 0x10000),
mnSin( 0 ),
- mnPrioEmbedded(nDefaultPrioEmbedded),
mnPrioAntiAlias(nDefaultPrioAntiAlias),
mpFontInfo( pFI ),
mnLoadFlags( 0 ),
@@ -383,6 +382,7 @@ FreetypeFont::FreetypeFont( const FontSelectPattern& rFSD, FreetypeFontInfo* pFI
mbArtItalic( false ),
mbArtBold(false)
{
+ int nPrioEmbedded = nDefaultPrioEmbedded;
// TODO: move update of mpFontInstance into FontEntry class when
// it becomes responsible for the FreetypeFont instantiation
static_cast<FreetypeFontInstance*>(mpFontInstance)->SetFreetypeFont( this );
@@ -434,7 +434,7 @@ FreetypeFont::FreetypeFont( const FontSelectPattern& rFSD, FreetypeFontInfo* pFI
mbArtItalic = (rFSD.GetItalic() != ITALIC_NONE && pFI->GetFontAttributes().GetItalic() == ITALIC_NONE);
mbArtBold = (rFSD.GetWeight() > WEIGHT_MEDIUM && pFI->GetFontAttributes().GetWeight() <= WEIGHT_MEDIUM);
- if( ((mnCos != 0) && (mnSin != 0)) || (mnPrioEmbedded <= 0) )
+ if( ((mnCos != 0) && (mnSin != 0)) || (nPrioEmbedded <= 0) )
mnLoadFlags |= FT_LOAD_NO_BITMAP;
}
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index fc58bc3464b6..e4b14c5c0b17 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -590,15 +590,11 @@ PPDParser::PPDParser( const OUString& rFile, std::vector<PPDKey*> keys) :
m_bType42Capable( false ),
m_nLanguageLevel( 0 ),
m_aFileEncoding( RTL_TEXTENCODING_MS_1252 ),
- m_pDefaultImageableArea( nullptr ),
m_pImageableAreas( nullptr ),
m_pDefaultPaperDimension( nullptr ),
m_pPaperDimensions( nullptr ),
m_pDefaultInputSlot( nullptr ),
- m_pInputSlots( nullptr ),
m_pDefaultResolution( nullptr ),
- m_pResolutions( nullptr ),
- m_pFontList( nullptr ),
m_pTranslator( new PPDTranslator() )
{
for (PPDKey* key: keys)
@@ -650,12 +646,13 @@ PPDParser::PPDParser( const OUString& rFile, std::vector<PPDKey*> keys) :
}
m_pImageableAreas = getKey( OUString( "ImageableArea" ) );
+ const PPDValue* pDefaultImageableArea = nullptr;
if( m_pImageableAreas )
- m_pDefaultImageableArea = m_pImageableAreas->getDefaultValue();
+ pDefaultImageableArea = m_pImageableAreas->getDefaultValue();
if (m_pImageableAreas == nullptr) {
SAL_WARN( "vcl.unx.print", "no ImageableArea in " << m_aFile);
}
- if (m_pDefaultImageableArea == nullptr) {
+ if (pDefaultImageableArea == nullptr) {
SAL_WARN( "vcl.unx.print", "no DefaultImageableArea in " << m_aFile);
}
@@ -669,33 +666,28 @@ PPDParser::PPDParser( const OUString& rFile, std::vector<PPDKey*> keys) :
SAL_WARN( "vcl.unx.print", "no DefaultPaperDimensions in " << m_aFile);
}
- m_pResolutions = getKey( OUString( "Resolution" ) );
- if( m_pResolutions )
- m_pDefaultResolution = m_pResolutions->getDefaultValue();
- if (m_pResolutions == nullptr) {
+ auto pResolutions = getKey( OUString( "Resolution" ) );
+ if( pResolutions )
+ m_pDefaultResolution = pResolutions->getDefaultValue();
+ if (pResolutions == nullptr) {
SAL_WARN( "vcl.unx.print", "no Resolution in " << m_aFile);
}
SAL_INFO_IF(!m_pDefaultResolution, "vcl.unx.print", "no DefaultResolution in " + m_aFile);
- m_pInputSlots = getKey( OUString( "InputSlot" ) );
- if( m_pInputSlots )
- m_pDefaultInputSlot = m_pInputSlots->getDefaultValue();
- SAL_INFO_IF(!m_pInputSlots, "vcl.unx.print", "no InputSlot in " << m_aFile);
+ auto pInputSlots = getKey( OUString( "InputSlot" ) );
+ if( pInputSlots )
+ m_pDefaultInputSlot = pInputSlots->getDefaultValue();
+ SAL_INFO_IF(!pInputSlots, "vcl.unx.print", "no InputSlot in " << m_aFile);
SAL_INFO_IF(!m_pDefaultInputSlot, "vcl.unx.print", "no DefaultInputSlot in " << m_aFile);
- m_pFontList = getKey( OUString( "Font" ) );
- if (m_pFontList == nullptr) {
+ auto pFontList = getKey( OUString( "Font" ) );
+ if (pFontList == nullptr) {
SAL_WARN( "vcl.unx.print", "no Font in " << m_aFile);
}
// fill in direct values
- if( (pKey = getKey( OUString( "ModelName" ) )) )
- m_aPrinterName = pKey->getValue( 0 )->m_aValue;
- if( (pKey = getKey( OUString( "NickName" ) )) )
- m_aNickName = pKey->getValue( 0 )->m_aValue;
if( (pKey = getKey( OUString( "print-color-mode" ) )) )
m_bColorDevice = pKey->countValues() > 1;
-
}
PPDParser::PPDParser( const OUString& rFile ) :
@@ -704,15 +696,11 @@ PPDParser::PPDParser( const OUString& rFile ) :
m_bType42Capable( false ),
m_nLanguageLevel( 0 ),
m_aFileEncoding( RTL_TEXTENCODING_MS_1252 ),
- m_pDefaultImageableArea( nullptr ),
m_pImageableAreas( nullptr ),
m_pDefaultPaperDimension( nullptr ),
m_pPaperDimensions( nullptr ),
m_pDefaultInputSlot( nullptr ),
- m_pInputSlots( nullptr ),
m_pDefaultResolution( nullptr ),
- m_pResolutions( nullptr ),
- m_pFontList( nullptr ),
m_pTranslator( new PPDTranslator() )
{
// read in the file
@@ -824,12 +812,13 @@ PPDParser::PPDParser( const OUString& rFile ) :
const PPDKey* pKey;
m_pImageableAreas = getKey( OUString( "ImageableArea" ) );
+ const PPDValue * pDefaultImageableArea = nullptr;
if( m_pImageableAreas )
- m_pDefaultImageableArea = m_pImageableAreas->getDefaultValue();
+ pDefaultImageableArea = m_pImageableAreas->getDefaultValue();
if (m_pImageableAreas == nullptr) {
SAL_WARN( "vcl.unx.print", "no ImageableArea in " << m_aFile);
}
- if (m_pDefaultImageableArea == nullptr) {
+ if (pDefaultImageableArea == nullptr) {
SAL_WARN( "vcl.unx.print", "no DefaultImageableArea in " << m_aFile);
}
@@ -843,30 +832,26 @@ PPDParser::PPDParser( const OUString& rFile ) :
SAL_WARN( "vcl.unx.print", "no DefaultPaperDimensions in " << m_aFile);
}
- m_pResolutions = getKey( OUString( "Resolution" ) );
- if( m_pResolutions )
- m_pDefaultResolution = m_pResolutions->getDefaultValue();
- if (m_pResolutions == nullptr) {
+ auto pResolutions = getKey( OUString( "Resolution" ) );
+ if( pResolutions )
+ m_pDefaultResolution = pResolutions->getDefaultValue();
+ if (pResolutions == nullptr) {
SAL_WARN( "vcl.unx.print", "no Resolution in " << m_aFile);
}
SAL_INFO_IF(!m_pDefaultResolution, "vcl.unx.print", "no DefaultResolution in " + m_aFile);
- m_pInputSlots = getKey( OUString( "InputSlot" ) );
- if( m_pInputSlots )
- m_pDefaultInputSlot = m_pInputSlots->getDefaultValue();
- SAL_INFO_IF(!m_pInputSlots, "vcl.unx.print", "no InputSlot in " << m_aFile);
+ auto pInputSlots = getKey( OUString( "InputSlot" ) );
+ if( pInputSlots )
+ m_pDefaultInputSlot = pInputSlots->getDefaultValue();
+ SAL_INFO_IF(!pInputSlots, "vcl.unx.print", "no InputSlot in " << m_aFile);
SAL_INFO_IF(!m_pDefaultInputSlot, "vcl.unx.print", "no DefaultInputSlot in " << m_aFile);
- m_pFontList = getKey( OUString( "Font" ) );
- if (m_pFontList == nullptr) {
+ auto pFontList = getKey( OUString( "Font" ) );
+ if (pFontList == nullptr) {
SAL_WARN( "vcl.unx.print", "no Font in " << m_aFile);
}
// fill in direct values
- if( (pKey = getKey( OUString( "ModelName" ) )) )
- m_aPrinterName = pKey->getValue( 0 )->m_aValue;
- if( (pKey = getKey( OUString( "NickName" ) )) )
- m_aNickName = pKey->getValue( 0 )->m_aValue;
if( (pKey = getKey( OUString( "ColorDevice" ) )) )
m_bColorDevice = pKey->getValue( 0 )->m_aValue.startsWithIgnoreAsciiCase( "true" );
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index a28af32d3595..a222d603270c 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -179,9 +179,10 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext
m_pAligns[i] = gtk_alignment_new(0, 0, 0, 1);
- m_pListStores[i] = gtk_list_store_new (1, G_TYPE_STRING);
- m_pLists[i] = gtk_combo_box_new_with_model(GTK_TREE_MODEL(m_pListStores[i]));
- g_object_unref (m_pListStores[i]); // owned by the widget.
+ GtkListStore *pListStores[ LIST_LAST ];
+ pListStores[i] = gtk_list_store_new (1, G_TYPE_STRING);
+ m_pLists[i] = gtk_combo_box_new_with_model(GTK_TREE_MODEL(pListStores[i]));
+ g_object_unref (pListStores[i]); // owned by the widget.
GtkCellRenderer *pCell = gtk_cell_renderer_text_new ();
gtk_cell_layout_pack_start(
GTK_CELL_LAYOUT(m_pLists[i]), pCell, TRUE);
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx
index c46f633b8b39..d951bb3aa542 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx
@@ -188,7 +188,6 @@ class SalGtkFilePicker : public SalGtkPicker, public SalGtkFilePicker_Base
GtkWidget *m_pHBoxs[ LIST_LAST ];
GtkWidget *m_pAligns[ LIST_LAST ];
GtkWidget *m_pLists[ LIST_LAST ];
- GtkListStore *m_pListStores[ LIST_LAST ];
GtkWidget *m_pListLabels[ LIST_LAST ];
bool mbListVisibility[ LIST_LAST ];
bool mbButtonVisibility[ BUTTON_LAST ];
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index d2349ed33cfe..0df08ad41176 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -2010,8 +2010,6 @@ class OpenGLTests
{
VclPtr<WorkWindow> mxWinA;
VclPtr<WorkWindow> mxWinB;
- OpenGLSalGraphicsImpl *mpImplA;
- OpenGLSalGraphicsImpl *mpImplB;
rtl::Reference<OpenGLContext> mpA;
rtl::Reference<OpenGLContext> mpB;
@@ -2025,18 +2023,20 @@ public:
mxWinA(VclPtr<WorkWindow>::Create(nullptr, WB_APP | WB_STDWORK)),
mxWinB(VclPtr<WorkWindow>::Create(nullptr, WB_APP | WB_STDWORK))
{
+ OpenGLSalGraphicsImpl *pImplA;
+ OpenGLSalGraphicsImpl *pImplB;
if (!OpenGLHelper::isVCLOpenGLEnabled())
{
- mpImplA = mpImplB = nullptr;
+ pImplA = pImplB = nullptr;
fprintf (stderr, "OpenGL is not enabled: try SAL_FORCEGL=1\n");
return;
}
- mpImplA = getImpl(mxWinA);
- mpImplB = getImpl(mxWinB);
- assert (mpImplA && mpImplB);
- mpA = mpImplA->GetOpenGLContext();
- mpB = mpImplB->GetOpenGLContext();
+ pImplA = getImpl(mxWinA);
+ pImplB = getImpl(mxWinB);
+ assert (pImplA && pImplB);
+ mpA = pImplA->GetOpenGLContext();
+ mpB = pImplB->GetOpenGLContext();
assert (mpA.is() && mpB.is());
assert (mpA != mpB);
More information about the Libreoffice-commits
mailing list