summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-25 11:24:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-26 06:49:31 +0000
commitfe1f1247fad782bdf43322532fdeb1ba9f03135a (patch)
treec8dfc79901c98bb69c3dd5e2a8ea5ab8cbbe6360 /vcl/source
parent9c34797cc98030614b384b6ea0f233d59ae82253 (diff)
loplugin:expandablemethods in vcl
Change-Id: I1876e203d3a3a5fa36d83a9b282ba49429c1da2a Reviewed-on: https://gerrit.libreoffice.org/30261 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/settings.cxx26
-rw-r--r--vcl/source/components/dtranscomp.cxx68
-rw-r--r--vcl/source/control/field.cxx9
-rw-r--r--vcl/source/control/imp_listbox.cxx16
-rw-r--r--vcl/source/edit/texteng.cxx21
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx7
-rw-r--r--vcl/source/filter/wmf/wmfwr.hxx1
-rw-r--r--vcl/source/gdi/bitmap.cxx4
-rw-r--r--vcl/source/gdi/octree.cxx16
-rw-r--r--vcl/source/gdi/print.cxx9
-rw-r--r--vcl/source/gdi/textlayout.cxx14
-rw-r--r--vcl/source/helper/threadex.cxx2
-rw-r--r--vcl/source/window/brdwin.cxx9
-rw-r--r--vcl/source/window/btndlg.cxx9
-rw-r--r--vcl/source/window/builder.cxx14
-rw-r--r--vcl/source/window/dockwin.cxx2
-rw-r--r--vcl/source/window/layout.cxx4
-rw-r--r--vcl/source/window/paint.cxx9
-rw-r--r--vcl/source/window/printdlg.cxx5
-rw-r--r--vcl/source/window/toolbox.cxx10
-rw-r--r--vcl/source/window/toolbox2.cxx16
21 files changed, 72 insertions, 199 deletions
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 6c9f743b70e9..5ca3f6f0bcfb 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -2381,14 +2381,6 @@ MiscSettings::~MiscSettings()
{
}
-void MiscSettings::CopyData()
-{
- // copy if other references exist
- if ( ! mxData.unique() ) {
- mxData = std::make_shared<ImplMiscData>(*mxData);
- }
-}
-
bool MiscSettings::operator ==( const MiscSettings& rSet ) const
{
if ( mxData == rSet.mxData )
@@ -2548,7 +2540,10 @@ void MiscSettings::SetEnableATToolSupport( bool bEnable )
void MiscSettings::SetEnableLocalizedDecimalSep( bool bEnable )
{
- CopyData();
+ // copy if other references exist
+ if ( ! mxData.unique() ) {
+ mxData = std::make_shared<ImplMiscData>(*mxData);
+ }
mxData->mbEnableLocalizedDecimalSep = bEnable;
}
@@ -2585,14 +2580,6 @@ HelpSettings::~HelpSettings()
{
}
-void HelpSettings::CopyData()
-{
- // copy if other references exist
- if ( ! mxData.unique() ) {
- mxData = std::make_shared<ImplHelpData>(*mxData);
- }
-}
-
bool HelpSettings::operator ==( const HelpSettings& rSet ) const
{
if ( mxData == rSet.mxData )
@@ -2615,7 +2602,10 @@ HelpSettings::GetTipDelay() const
void
HelpSettings::SetTipTimeout( sal_uLong nTipTimeout )
{
- CopyData();
+ // copy if other references exist
+ if ( ! mxData.unique() ) {
+ mxData = std::make_shared<ImplHelpData>(*mxData);
+ }
mxData->mnTipTimeout = nTipTimeout;
}
diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx
index c58835b32b2b..9456ca5789a5 100644
--- a/vcl/source/components/dtranscomp.cxx
+++ b/vcl/source/components/dtranscomp.cxx
@@ -78,7 +78,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( RuntimeException, std::exception ) override;
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( RuntimeException, std::exception ) override;
- static OUString getImplementationName_static();
static Sequence< OUString > getSupportedServiceNames_static();
/*
@@ -119,11 +118,6 @@ GenericClipboard::~GenericClipboard()
{
}
-OUString GenericClipboard::getImplementationName_static()
-{
- return OUString( "com.sun.star.datatransfer.VCLGenericClipboard" );
-}
-
Sequence< OUString > GenericClipboard::getSupportedServiceNames_static()
{
Sequence< OUString > aRet { "com.sun.star.datatransfer.clipboard.SystemClipboard" };
@@ -132,7 +126,7 @@ Sequence< OUString > GenericClipboard::getSupportedServiceNames_static()
OUString GenericClipboard::getImplementationName() throw( RuntimeException, std::exception )
{
- return getImplementationName_static();
+ return OUString("com.sun.star.datatransfer.VCLGenericClipboard");
}
Sequence< OUString > GenericClipboard::getSupportedServiceNames() throw( RuntimeException, std::exception )
@@ -243,17 +237,15 @@ Reference< XInterface > ClipboardFactory::createInstanceWithArguments( const Seq
OUString SAL_CALL Clipboard_getImplementationName()
{
- #if defined UNX
return OUString(
- #if ! defined MACOSX
+ #if defined MACOSX
+ "com.sun.star.datatransfer.clipboard.AquaClipboard"
+ #elif defined UNX
"com.sun.star.datatransfer.X11ClipboardSupport"
#else
- "com.sun.star.datatransfer.clipboard.AquaClipboard"
+ "com.sun.star.datatransfer.VCLGenericClipboard"
#endif
);
- #else
- return GenericClipboard::getImplementationName_static();
- #endif
}
Reference< XSingleServiceFactory > SAL_CALL Clipboard_createFactory( const Reference< XMultiServiceFactory > & )
@@ -290,7 +282,7 @@ public:
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override
- { return getImplementationName_static(); }
+ { return OUString("com.sun.star.datatransfer.dnd.VclGenericDragSource"); }
sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
throw (css::uno::RuntimeException, std::exception) override
@@ -305,11 +297,6 @@ public:
Sequence<OUString> aRet { "com.sun.star.datatransfer.dnd.GenericDragSource" };
return aRet;
}
-
- static OUString getImplementationName_static()
- {
- return OUString("com.sun.star.datatransfer.dnd.VclGenericDragSource");
- }
};
GenericDragSource::~GenericDragSource()
@@ -345,27 +332,23 @@ void GenericDragSource::initialize( const Sequence< Any >& ) throw( Exception, s
Sequence< OUString > SAL_CALL DragSource_getSupportedServiceNames()
{
#if defined MACOSX
- return Sequence< OUString > { "com.sun.star.datatransfer.dnd.OleDragSource" };
+ return { "com.sun.star.datatransfer.dnd.OleDragSource" };
#elif defined UNX
- return Sequence< OUString > { "com.sun.star.datatransfer.dnd.X11DragSource" };
+ return { "com.sun.star.datatransfer.dnd.X11DragSource" };
#else
- return GenericDragSource::getSupportedServiceNames_static();
+ return { "com.sun.star.datatransfer.dnd.VclGenericDragSource" };
#endif
}
OUString SAL_CALL DragSource_getImplementationName()
{
- #if defined UNX
- return OUString(
- #if ! defined MACOSX
- "com.sun.star.datatransfer.dnd.XdndSupport"
- #else
- "com.sun.star.comp.datatransfer.dnd.OleDragSource_V1"
- #endif
- );
- #else
- return GenericDragSource::getImplementationName_static();
- #endif
+#if defined MACOSX
+ return OUString("com.sun.star.comp.datatransfer.dnd.OleDragSource_V1");
+#elif defined UNX
+ return OUString("com.sun.star.datatransfer.dnd.XdndSupport");
+#else
+ return OUString("com.sun.star.datatransfer.dnd.VclGenericDragSource");
+#endif
}
Reference< XInterface > SAL_CALL DragSource_createInstance( const Reference< XMultiServiceFactory >& )
@@ -404,7 +387,7 @@ public:
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override
- { return getImplementationName_static(); }
+ { return OUString("com.sun.star.datatransfer.dnd.VclGenericDropTarget"); }
sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
throw (css::uno::RuntimeException, std::exception) override
@@ -419,11 +402,6 @@ public:
Sequence<OUString> aRet { "com.sun.star.datatransfer.dnd.GenericDropTarget" };
return aRet;
}
-
- static OUString getImplementationName_static()
- {
- return OUString("com.sun.star.datatransfer.dnd.VclGenericDropTarget");
- }
};
GenericDropTarget::~GenericDropTarget()
@@ -473,17 +451,15 @@ Sequence< OUString > SAL_CALL DropTarget_getSupportedServiceNames()
OUString SAL_CALL DropTarget_getImplementationName()
{
- #if defined UNX
return OUString(
- #if ! defined MACOSX
- "com.sun.star.datatransfer.dnd.XdndDropTarget"
- #else
+ #if defined MACOSX
"com.sun.star.comp.datatransfer.dnd.OleDropTarget_V1"
- #endif
- );
+ #elif defined UNX
+ "com.sun.star.datatransfer.dnd.XdndDropTarget"
#else
- return GenericDropTarget::getImplementationName_static();
+ "com.sun.star.datatransfer.dnd.VclGenericDropTarget"
#endif
+ );
}
Reference< XInterface > SAL_CALL DropTarget_createInstance( const Reference< XMultiServiceFactory >& )
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 8765e341b71d..fe4d60cb00f5 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -1845,11 +1845,6 @@ CurrencyFormatter::~CurrencyFormatter()
{
}
-OUString CurrencyFormatter::GetCurrencySymbol() const
-{
- return ImplGetLocaleDataWrapper().getCurrSymbol();
-}
-
void CurrencyFormatter::SetValue( sal_Int64 nNewValue )
{
SetUserValue( nNewValue );
@@ -1859,7 +1854,9 @@ void CurrencyFormatter::SetValue( sal_Int64 nNewValue )
OUString CurrencyFormatter::CreateFieldText( sal_Int64 nValue ) const
{
- return ImplGetLocaleDataWrapper().getCurr( nValue, GetDecimalDigits(), GetCurrencySymbol(), IsUseThousandSep() );
+ return ImplGetLocaleDataWrapper().getCurr( nValue, GetDecimalDigits(),
+ ImplGetLocaleDataWrapper().getCurrSymbol(),
+ IsUseThousandSep() );
}
sal_Int64 CurrencyFormatter::GetValue() const
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index e6359c75a170..70deaaeb8079 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -2575,17 +2575,11 @@ ImplWin::ImplWin( vcl::Window* pParent, WinBits nWinStyle ) :
mnItemPos = LISTBOX_ENTRY_NOTFOUND;
}
-void ImplWin::MBDown()
-{
- if (IsEnabled())
- maMBDownHdl.Call(this);
-}
-
void ImplWin::MouseButtonDown( const MouseEvent& )
{
if( IsEnabled() )
{
- MBDown();
+ maMBDownHdl.Call(this);
}
}
@@ -2885,18 +2879,12 @@ ImplBtn::ImplBtn( vcl::Window* pParent, WinBits nWinStyle ) :
{
}
-void ImplBtn::MBDown()
-{
- if (IsEnabled())
- maMBDownHdl.Call(this);
-}
-
void ImplBtn::MouseButtonDown( const MouseEvent& )
{
//PushButton::MouseButtonDown( rMEvt );
if( IsEnabled() )
{
- MBDown();
+ maMBDownHdl.Call(this);
mbDown = true;
}
}
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index 20969d26e8bd..f91e69d8252e 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -1519,7 +1519,7 @@ void TextEngine::FormatDoc()
{
const long nOldParaWidth = mnCurTextWidth >= 0 ? CalcTextWidth( nPara ) : -1;
- ImpFormattingParagraph( nPara );
+ Broadcast( TextHint( TEXT_HINT_FORMATPARA, nPara ) );
if ( CreateLines( nPara ) )
bGrow = true;
@@ -1578,14 +1578,14 @@ void TextEngine::FormatDoc()
if ( nDiff )
{
mbFormatted = true;
- ImpTextHeightChanged();
+ Broadcast( TextHint( TEXT_HINT_TEXTHEIGHTCHANGED ) );
}
}
mbIsFormatting = false;
mbFormatted = true;
- ImpTextFormatted();
+ Broadcast( TextHint( TEXT_HINT_TEXTFORMATTED ) );
}
void TextEngine::CreateAndInsertEmptyLine( sal_uInt32 nPara )
@@ -2746,21 +2746,6 @@ void TextEngine::ImpCharsInserted( sal_uInt32 nPara, sal_Int32 nPos, sal_Int32 n
Broadcast( TextHint( TEXT_HINT_PARACONTENTCHANGED, nPara ) );
}
-void TextEngine::ImpFormattingParagraph( sal_uInt32 nPara )
-{
- Broadcast( TextHint( TEXT_HINT_FORMATPARA, nPara ) );
-}
-
-void TextEngine::ImpTextHeightChanged()
-{
- Broadcast( TextHint( TEXT_HINT_TEXTHEIGHTCHANGED ) );
-}
-
-void TextEngine::ImpTextFormatted()
-{
- Broadcast( TextHint( TEXT_HINT_TEXTFORMATTED ) );
-}
-
void TextEngine::Draw( OutputDevice* pDev, const Point& rPos )
{
ImpPaint( pDev, rPos, nullptr );
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 3d8bb911df40..969a6f74d5a0 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -838,11 +838,6 @@ void WMFWriter::TrueTextOut(const Point & rPoint, const OString& rString)
UpdateRecordHeader();
}
-void WMFWriter::WMFRecord_EndOfFile()
-{
- WriteRecordHeader(0x00000003,0x0000);
-}
-
void WMFWriter::WMFRecord_IntersectClipRect( const Rectangle& rRect )
{
WriteRecordHeader( 0x00000007, W_META_INTERSECTCLIPRECT );
@@ -1787,7 +1782,7 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
// Write records
WriteRecords(rMTF);
- WMFRecord_EndOfFile();
+ WriteRecordHeader(0x00000003,0x0000); // end of file
UpdateHeader();
while(pAttrStack)
diff --git a/vcl/source/filter/wmf/wmfwr.hxx b/vcl/source/filter/wmf/wmfwr.hxx
index 47e0d569b24d..c7d130e4020e 100644
--- a/vcl/source/filter/wmf/wmfwr.hxx
+++ b/vcl/source/filter/wmf/wmfwr.hxx
@@ -170,7 +170,6 @@ private:
void WMFRecord_SetWindowOrg(const Point & rPoint);
void WMFRecord_StretchDIB(const Point & rPoint, const Size & rSize, const Bitmap & rBitmap, sal_uInt32 nROP = 0UL );
void WMFRecord_TextOut(const Point & rPoint, const OUString & rString);
- void WMFRecord_EndOfFile();
void WMFRecord_IntersectClipRect( const Rectangle& rRect);
sal_uInt16 AllocHandle();
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index e9461d1e5f6a..cf0bf70343e3 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -241,8 +241,8 @@ Bitmap& Bitmap::operator=( Bitmap&& rBitmap )
bool Bitmap::IsEqual( const Bitmap& rBmp ) const
{
- return(IsSameInstance(rBmp) || // Includes both are nullptr
- (rBmp.mxImpBmp && mxImpBmp && mxImpBmp->ImplIsEqual(*rBmp.mxImpBmp)));
+ return rBmp.mxImpBmp == mxImpBmp || // Includes both are nullptr
+ (rBmp.mxImpBmp && mxImpBmp && mxImpBmp->ImplIsEqual(*rBmp.mxImpBmp));
}
void Bitmap::SetEmpty()
diff --git a/vcl/source/gdi/octree.cxx b/vcl/source/gdi/octree.cxx
index cfd079b2c4e7..7df368b4fe7e 100644
--- a/vcl/source/gdi/octree.cxx
+++ b/vcl/source/gdi/octree.cxx
@@ -60,17 +60,7 @@ Octree::Octree( const BitmapReadAccess& rReadAcc, sal_uLong nColors ) :
{
pNodeCache = new ImpNodeCache( nColors );
memset( pReduce, 0, ( OCTREE_BITS + 1 ) * sizeof( NODE* ) );
- ImplCreateOctree();
-}
-
-Octree::~Octree()
-{
- ImplDeleteOctree( &pTree );
- delete pNodeCache;
-}
-void Octree::ImplCreateOctree()
-{
if( !!*pAcc )
{
const long nWidth = pAcc->Width();
@@ -113,6 +103,12 @@ void Octree::ImplCreateOctree()
}
}
+Octree::~Octree()
+{
+ ImplDeleteOctree( &pTree );
+ delete pNodeCache;
+}
+
void Octree::ImplDeleteOctree( NODE** ppNode )
{
for (OctreeNode* i : (*ppNode)->pChild)
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 45c771a037fe..da2305cd66ba 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1306,7 +1306,9 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe
{
ImplJobSetup& rData = aJobSetup.ImplGetData();
- int nLandscapeAngle = GetLandscapeAngle();
+ // The angle that a landscape page will be turned counterclockwise wrt to portrait.
+ int nLandscapeAngle = mpInfoPrinter ? mpInfoPrinter->GetLandscapeAngle( &maJobSetup.ImplGetConstData() ) : 900;
+
int nPaperCount = GetPaperInfoCount();
bool bFound = false;
@@ -1596,11 +1598,6 @@ bool Printer::SetDuplexMode( DuplexMode eDuplex )
return true;
}
-int Printer::GetLandscapeAngle() const
-{
- return mpInfoPrinter ? mpInfoPrinter->GetLandscapeAngle( &maJobSetup.ImplGetConstData() ) : 900;
-}
-
Paper Printer::GetPaper() const
{
return maJobSetup.ImplGetConstData().GetPaperFormat();
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index 4d9783e188b9..ad11dee6f397 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -87,16 +87,6 @@ namespace vcl
long GetTextArray( const OUString& _rText, long* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const;
Rectangle DrawText( const Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, MetricVector* _pVector, OUString* _pDisplayText );
- protected:
- void onBeginDrawText()
- {
- m_aCompleteTextRect.SetEmpty();
- }
- const Rectangle& onEndDrawText()
- {
- return m_aCompleteTextRect;
- }
-
private:
OutputDevice& m_rTargetDevice;
OutputDevice& m_rReferenceDevice;
@@ -268,9 +258,9 @@ namespace vcl
// but passed pixel coordinates. So, adjust the rect.
Rectangle aRect( m_rTargetDevice.PixelToLogic( _rRect ) );
- onBeginDrawText();
+ m_aCompleteTextRect.SetEmpty();
m_rTargetDevice.DrawText( aRect, _rText, _nStyle, _pVector, _pDisplayText, this );
- Rectangle aTextRect = onEndDrawText();
+ Rectangle aTextRect = m_aCompleteTextRect;
if ( aTextRect.IsEmpty() && !aRect.IsEmpty() )
{
diff --git a/vcl/source/helper/threadex.cxx b/vcl/source/helper/threadex.cxx
index f09f2f43f313..24b418e50702 100644
--- a/vcl/source/helper/threadex.cxx
+++ b/vcl/source/helper/threadex.cxx
@@ -46,7 +46,7 @@ IMPL_LINK_NOARG(SolarThreadExecutor, worker, void*, void)
}
}
-void SolarThreadExecutor::impl_execute()
+void SolarThreadExecutor::execute()
{
if( ::osl::Thread::getCurrentIdentifier() == Application::GetMainThreadIdentifier() )
{
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 842fe831cf65..ce63cfd4d593 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1709,13 +1709,6 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con
void ImplBorderWindow::ImplInit( vcl::Window* pParent,
WinBits nStyle, BorderWindowStyle nTypeStyle,
- const css::uno::Any& )
-{
- ImplInit( pParent, nStyle, nTypeStyle, nullptr );
-}
-
-void ImplBorderWindow::ImplInit( vcl::Window* pParent,
- WinBits nStyle, BorderWindowStyle nTypeStyle,
SystemParentData* pSystemParentData
)
{
@@ -1804,7 +1797,7 @@ ImplBorderWindow::ImplBorderWindow( vcl::Window* pParent, WinBits nStyle ,
BorderWindowStyle nTypeStyle ) :
Window( WINDOW_BORDERWINDOW )
{
- ImplInit( pParent, nStyle, nTypeStyle, css::uno::Any() );
+ ImplInit( pParent, nStyle, nTypeStyle, nullptr );
}
ImplBorderWindow::~ImplBorderWindow()
diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx
index 70d3d45031ef..aafb1c828e1e 100644
--- a/vcl/source/window/btndlg.cxx
+++ b/vcl/source/window/btndlg.cxx
@@ -220,7 +220,8 @@ IMPL_LINK( ButtonDialog, ImplClickHdl, Button*, pBtn, void )
if ( it->mpPushButton == pBtn )
{
mnCurButtonId = it->mnId;
- Click();
+ if ( IsInExecute() )
+ EndDialog( mnCurButtonId );
break;
}
}
@@ -260,12 +261,6 @@ void ButtonDialog::StateChanged( StateChangedType nType )
Dialog::StateChanged( nType );
}
-void ButtonDialog::Click()
-{
- if ( IsInExecute() )
- EndDialog( GetCurButtonId() );
-}
-
void ButtonDialog::AddButton( const OUString& rText, sal_uInt16 nId,
ButtonDialogFlags nBtnFlags, long nSepPixel )
{
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index a117a9217f82..1c6db662a738 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -2265,16 +2265,6 @@ void VclBuilder::collectAtkAttribute(xmlreader::XmlReader &reader, stringmap &rM
rMap[sProperty] = sValue;
}
-void VclBuilder::handleAdjustment(const OString &rID, stringmap &rProperties)
-{
- m_pParserState->m_aAdjustments[rID] = rProperties;
-}
-
-void VclBuilder::handleTextBuffer(const OString &rID, stringmap &rProperties)
-{
- m_pParserState->m_aTextBuffers[rID] = rProperties;
-}
-
void VclBuilder::handleRow(xmlreader::XmlReader &reader, const OString &rID, sal_Int32 nRowIndex)
{
int nLevel = 1;
@@ -2904,12 +2894,12 @@ VclPtr<vcl::Window> VclBuilder::handleObject(vcl::Window *pParent, xmlreader::Xm
if (sClass == "GtkAdjustment")
{
- handleAdjustment(sID, aProperties);
+ m_pParserState->m_aAdjustments[sID] = aProperties;
return nullptr;
}
else if (sClass == "GtkTextBuffer")
{
- handleTextBuffer(sID, aProperties);
+ m_pParserState->m_aTextBuffers[sID] = aProperties;
return nullptr;
}
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index e48df2e7385b..c07dc2102e99 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -1043,7 +1043,7 @@ Size DockingWindow::GetOptimalSize() const
void DockingWindow::queue_resize(StateChangedType eReason)
{
bool bTriggerLayout = true;
- if (maLayoutIdle.IsActive() || isCalculatingInitialLayoutSize())
+ if (maLayoutIdle.IsActive() || mbIsCalculatingInitialLayoutSize)
{
bTriggerLayout = false;
}
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 884e5e04bfd7..e624ed55422b 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1440,9 +1440,9 @@ bool VclGrid::set_property(const OString &rKey, const OString &rValue)
else if (rKey == "column-spacing")
set_column_spacing(rValue.toInt32());
else if (rKey == "row-homogeneous")
- set_row_homogeneous(toBool(rValue));
+ m_bRowHomogeneous = toBool(rValue);
else if (rKey == "column-homogeneous")
- set_column_homogeneous(toBool(rValue));
+ m_bColumnHomogeneous = toBool(rValue);
else if (rKey == "n-rows")
/*nothing to do*/;
else
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index af0896c69ece..7639a0ee8115 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -638,12 +638,6 @@ void Window::ImplCallOverlapPaint()
}
}
-void Window::ImplPostPaint()
-{
- if ( !mpWindowImpl->mpFrameData->maPaintIdle.IsActive() )
- mpWindowImpl->mpFrameData->maPaintIdle.Start();
-}
-
IMPL_LINK_NOARG(Window, ImplHandlePaintHdl, Idle *, void)
{
// save paint events until layout is done
@@ -732,7 +726,8 @@ void Window::ImplInvalidateFrameRegion( const vcl::Region* pRegion, InvalidateFl
pParent->ImplInvalidateFrameRegion( pChildRegion, nFlags );
}
}
- ImplPostPaint();
+ if ( !mpWindowImpl->mpFrameData->maPaintIdle.IsActive() )
+ mpWindowImpl->mpFrameData->maPaintIdle.Start();
}
void Window::ImplInvalidateOverlapFrameRegion( const vcl::Region& rRegion )
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index d0abe927796a..04e150dd0043 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -310,11 +310,6 @@ PrintDialog::ShowNupOrderWindow::ShowNupOrderWindow( vcl::Window* i_pParent )
, mnRows( 1 )
, mnColumns( 1 )
{
- ImplInitSettings();
-}
-
-void PrintDialog::ShowNupOrderWindow::ImplInitSettings()
-{
SetBackground( Wallpaper( GetSettings().GetStyleSettings().GetFieldColor() ) );
}
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 24cb4a77d059..4378e01c6aee 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -18,6 +18,7 @@
*/
#include <vcl/toolbox.hxx>
+#include <vcl/commandinfoprovider.hxx>
#include <vcl/event.hxx>
#include <vcl/decoview.hxx>
#include <vcl/accel.hxx>
@@ -4518,7 +4519,14 @@ void ToolBox::statusChanged( const css::frame::FeatureStateEvent& Event )
mbImagesMirrored = aItem.IsMirrored();
mnImagesRotationAngle = aItem.GetRotation();
- UpdateImageOrientation();
+ // update image orientation
+ for (std::vector<ImplToolItem>::const_iterator it = mpData->m_aItems.begin(); it != mpData->m_aItems.end(); ++it)
+ {
+ if (vcl::CommandInfoProvider::Instance().IsMirrored(it->maCommandStr))
+ SetItemImageMirrorMode(it->mnId, mbImagesMirrored);
+ if (vcl::CommandInfoProvider::Instance().IsRotated(it->maCommandStr))
+ SetItemImageAngle(it->mnId, mnImagesRotationAngle);
+ }
}
}
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index af98244747df..677f9c13c01c 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1067,17 +1067,6 @@ void ToolBox::SetItemImageMirrorMode( sal_uInt16 nItemId, bool bMirror )
}
}
-void ToolBox::UpdateImageOrientation()
-{
- for (std::vector<ImplToolItem>::const_iterator it = mpData->m_aItems.begin(); it != mpData->m_aItems.end(); ++it)
- {
- if (vcl::CommandInfoProvider::Instance().IsMirrored(it->maCommandStr))
- SetItemImageMirrorMode(it->mnId, mbImagesMirrored);
- if (vcl::CommandInfoProvider::Instance().IsRotated(it->maCommandStr))
- SetItemImageAngle(it->mnId, mnImagesRotationAngle);
- }
-}
-
Image ToolBox::GetItemImage(sal_uInt16 nItemId) const
{
ImplToolItem* pItem = ImplGetItem(nItemId);
@@ -1718,11 +1707,6 @@ IMPL_LINK( ToolBox, ImplCustomMenuListener, VclMenuEvent&, rEvent, void )
IMPL_LINK_NOARG(ToolBox, ImplCallExecuteCustomMenu, void*, void)
{
mpData->mnEventId = nullptr;
- ImplExecuteCustomMenu();
-}
-
-void ToolBox::ImplExecuteCustomMenu()
-{
if( IsMenuEnabled() )
{
if( GetMenuType() & ToolBoxMenuType::Customize )