[Libreoffice-commits] core.git: 5 commits - editeng/source include/vcl sc/source sd/source svx/source sw/source vcl/inc vcl/source vcl/unx
Noel Grandin
noel.grandin at collabora.co.uk
Fri Dec 15 06:20:58 UTC 2017
editeng/source/editeng/editobj.cxx | 2 +-
editeng/source/editeng/editobj2.hxx | 4 ++--
editeng/source/editeng/impedit4.cxx | 2 +-
include/vcl/help.hxx | 6 +++---
sc/source/ui/app/inputhdl.cxx | 8 ++++----
sc/source/ui/app/inputwin.cxx | 4 ++--
sc/source/ui/inc/inputhdl.hxx | 6 +++---
sc/source/ui/inc/inputwin.hxx | 2 +-
sc/source/ui/inc/tabview.hxx | 2 +-
sc/source/ui/view/tabview.cxx | 2 +-
sc/source/ui/view/tabview4.cxx | 2 +-
sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx | 2 +-
sd/source/ui/slidesorter/view/SlsToolTip.cxx | 6 +++---
svx/source/dialog/_contdlg.cxx | 10 +++++-----
svx/source/dialog/contimp.hxx | 4 ++--
sw/source/core/text/inftxt.hxx | 10 +++++-----
sw/source/uibase/docvw/edtwin.cxx | 4 ++--
vcl/inc/salframe.hxx | 8 ++++----
vcl/inc/unx/gtk/gtkframe.hxx | 6 +++---
vcl/source/app/help.cxx | 14 +++++++-------
vcl/unx/generic/gdi/gdiimpl.cxx | 2 +-
vcl/unx/generic/gdi/gdiimpl.hxx | 2 +-
vcl/unx/gtk3/gtk3gtkframe.cxx | 12 ++++++------
23 files changed, 60 insertions(+), 60 deletions(-)
New commits:
commit a45548c39537a0d881c79484be35c948b216f84b
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Thu Dec 14 12:20:31 2017 +0200
sal_uIntPtr/sal_uLong->void* in Popover ids
Change-Id: Ifd7eeadeacffb90ea303c1e6bca807d310098f66
Reviewed-on: https://gerrit.libreoffice.org/46484
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/vcl/help.hxx b/include/vcl/help.hxx
index cb1c297e9379..00e46ebb5663 100644
--- a/include/vcl/help.hxx
+++ b/include/vcl/help.hxx
@@ -100,15 +100,15 @@ public:
static void HideBalloonAndQuickHelp();
- static sal_uLong ShowPopover(vcl::Window* pParent,
+ static void* ShowPopover(vcl::Window* pParent,
const tools::Rectangle& rScreenRect,
const OUString& rText,
QuickHelpFlags nStyle);
- static void UpdatePopover(sal_uLong nId,
+ static void UpdatePopover(void* nId,
vcl::Window* pParent,
const tools::Rectangle& rScreenRect,
const OUString& rText);
- static void HidePopover(vcl::Window const * pParent, sal_uLong nId);
+ static void HidePopover(vcl::Window const * pParent, void* nId);
};
#endif // INCLUDED_VCL_HELP_HXX
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 94f3464c783f..7cf8faa1d231 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -607,9 +607,9 @@ ScInputHandler::ScInputHandler()
pFormulaData( nullptr ),
pFormulaDataPara( nullptr ),
pTipVisibleParent( nullptr ),
- nTipVisible( 0 ),
+ nTipVisible( nullptr ),
pTipVisibleSecParent( nullptr ),
- nTipVisibleSec( 0 ),
+ nTipVisibleSec( nullptr ),
nFormSelStart( 0 ),
nFormSelEnd( 0 ),
nAutoPar( 0 ),
@@ -869,7 +869,7 @@ void ScInputHandler::HideTip()
{
pTipVisibleParent->RemoveEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleParentListener ) );
Help::HidePopover(pTipVisibleParent, nTipVisible );
- nTipVisible = 0;
+ nTipVisible = nullptr;
pTipVisibleParent = nullptr;
}
aManualTip.clear();
@@ -880,7 +880,7 @@ void ScInputHandler::HideTipBelow()
{
pTipVisibleSecParent->RemoveEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleSecParentListener ) );
Help::HidePopover(pTipVisibleSecParent, nTipVisibleSec);
- nTipVisibleSec = 0;
+ nTipVisibleSec = nullptr;
pTipVisibleSecParent = nullptr;
}
aManualTip.clear();
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 6572e0b01d95..a7ff74f109c2 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1783,7 +1783,7 @@ void ScTextWnd::TextGrabFocus()
ScPosWnd::ScPosWnd( vcl::Window* pParent ) :
ComboBox ( pParent, WinBits(WB_HIDE | WB_DROPDOWN) ),
- nTipVisible ( 0 ),
+ nTipVisible ( nullptr ),
bFormulaMode( false )
{
set_id("pos_window");
@@ -1965,7 +1965,7 @@ void ScPosWnd::HideTip()
if (!pWin)
pWin = this;
Help::HidePopover(pWin, nTipVisible);
- nTipVisible = 0;
+ nTipVisible = nullptr;
}
}
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index 978f6bdf3705..3bc760446b02 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -67,9 +67,9 @@ private:
ScTypedCaseStrSet::const_iterator miAutoPosFormula;
VclPtr<vcl::Window> pTipVisibleParent;
- sal_uLong nTipVisible;
+ void* nTipVisible;
VclPtr<vcl::Window> pTipVisibleSecParent;
- sal_uLong nTipVisibleSec;
+ void* nTipVisibleSec;
OUString aManualTip;
OUString aAutoSearch;
@@ -231,7 +231,7 @@ public:
bool DataChanging( sal_Unicode cTyped = 0, bool bFromCommand = false );
void DataChanged( bool bFromTopNotify = false, bool bSetModified = true );
- bool TakesReturn() const { return ( nTipVisible != 0 ); }
+ bool TakesReturn() const { return ( nTipVisible != nullptr ); }
void SetModified() { bModified = true; }
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 4eb44bd269b0..2c645a509307 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -155,7 +155,7 @@ class ScPosWnd : public ComboBox, public SfxListener // Display position
{
private:
OUString aPosStr;
- sal_uLong nTipVisible;
+ void* nTipVisible;
bool bFormulaMode;
public:
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 0424a639759c..6eddd88a5c5f 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -170,7 +170,7 @@ private:
ScExtraEditViewManager aExtraEditViewManager;
- sal_uLong nTipVisible;
+ void* nTipVisible;
tools::Rectangle aTipRectangle;
QuickHelpFlags nTipAlign;
OUString sTipString;
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 3e3a3c037f99..1c6e61cc6ad4 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -213,7 +213,7 @@ ScTabView::ScTabView( vcl::Window* pParent, ScDocShell& rDocSh, ScTabViewShell*
pDrawBrushSet( nullptr ),
pTimerWindow( nullptr ),
aExtraEditViewManager( pViewShell, pGridWin ),
- nTipVisible( 0 ),
+ nTipVisible( nullptr ),
nTipAlign( QuickHelpFlags::NONE ),
nPrevDragPos( 0 ),
meBlockMode(None),
diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx
index 4ddb18f7ec01..d56dcbf439ef 100644
--- a/sc/source/ui/view/tabview4.cxx
+++ b/sc/source/ui/view/tabview4.cxx
@@ -38,7 +38,7 @@ void ScTabView::HideTip()
ScSplitPos eWhich = aViewData.GetActivePart();
vcl::Window* pWin = pGridWin[eWhich];
Help::HidePopover(pWin, nTipVisible);
- nTipVisible = 0;
+ nTipVisible = nullptr;
aTipRectangle = tools::Rectangle();
nTipAlign = QuickHelpFlags::NONE;
sTipString.clear();
diff --git a/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx b/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx
index 575eef4b97f3..3c9658a4f340 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx
@@ -56,7 +56,7 @@ private:
SlideSorter& mrSlideSorter;
model::SharedPageDescriptor mpDescriptor;
OUString msCurrentHelpText;
- sal_uLong mnHelpWindowHandle;
+ void* mnHelpWindowHandle;
Timer maShowTimer;
Timer maHiddenTimer;
diff --git a/sd/source/ui/slidesorter/view/SlsToolTip.cxx b/sd/source/ui/slidesorter/view/SlsToolTip.cxx
index ca76917ef35c..5d341e35ada1 100644
--- a/sd/source/ui/slidesorter/view/SlsToolTip.cxx
+++ b/sd/source/ui/slidesorter/view/SlsToolTip.cxx
@@ -33,7 +33,7 @@ namespace sd { namespace slidesorter { namespace view {
ToolTip::ToolTip (SlideSorter& rSlideSorter)
: mrSlideSorter(rSlideSorter),
msCurrentHelpText(),
- mnHelpWindowHandle(0),
+ mnHelpWindowHandle(nullptr),
maShowTimer(),
maHiddenTimer()
{
@@ -139,11 +139,11 @@ void ToolTip::DoShow()
bool ToolTip::Hide()
{
- if (mnHelpWindowHandle>0)
+ if (mnHelpWindowHandle)
{
sd::Window *pWindow (mrSlideSorter.GetContentWindow().get());
Help::HidePopover(pWindow, mnHelpWindowHandle);
- mnHelpWindowHandle = 0;
+ mnHelpWindowHandle = nullptr;
return true;
}
else
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index da86a7d49149..f5b582994ec7 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -266,7 +266,7 @@ struct QuickHelpData
/// Display help string as a tip rather than inline.
bool m_bIsTip;
/// Tip ID when a help string is displayed as a tip.
- sal_uLong nTipId;
+ void* nTipId;
/// Append a space character to the displayed help string (if appropriate).
bool m_bAppendSpace;
@@ -5930,7 +5930,7 @@ void QuickHelpData::ClearContent()
{
nLen = nCurArrPos = 0;
m_bIsDisplayed = m_bAppendSpace = false;
- nTipId = 0;
+ nTipId = nullptr;
m_aHelpStrings.clear();
m_bIsTip = true;
m_bIsAutoText = true;
diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx
index 0e3d6bafac60..652da0177279 100644
--- a/vcl/inc/salframe.hxx
+++ b/vcl/inc/salframe.hxx
@@ -244,19 +244,19 @@ public:
}
// return !0 to indicate popovers are shown natively, 0 otherwise
- virtual sal_uIntPtr ShowPopover(const OUString& /*rHelpText*/, const tools::Rectangle& /*rHelpArea*/, QuickHelpFlags /*nFlags*/)
+ virtual void* ShowPopover(const OUString& /*rHelpText*/, const tools::Rectangle& /*rHelpArea*/, QuickHelpFlags /*nFlags*/)
{
- return 0;
+ return nullptr;
}
// return true to indicate popovers are shown natively, false otherwise
- virtual bool UpdatePopover(sal_uIntPtr /*nId*/, const OUString& /*rHelpText*/, const tools::Rectangle& /*rHelpArea*/)
+ virtual bool UpdatePopover(void* /*nId*/, const OUString& /*rHelpText*/, const tools::Rectangle& /*rHelpArea*/)
{
return false;
}
// return true to indicate popovers are shown natively, false otherwise
- virtual bool HidePopover(sal_uIntPtr /*nId*/)
+ virtual bool HidePopover(void* /*nId*/)
{
return false;
}
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index fecdbb1a382d..078ff5589b58 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -532,9 +532,9 @@ public:
#if GTK_CHECK_VERSION(3,0,0)
virtual void SetModal(bool bModal) override;
virtual bool ShowTooltip(const OUString& rHelpText, const tools::Rectangle& rHelpArea) override;
- virtual sal_uIntPtr ShowPopover(const OUString& rHelpText, const tools::Rectangle& rHelpArea, QuickHelpFlags nFlags) override;
- virtual bool UpdatePopover(sal_uIntPtr nId, const OUString& rHelpText, const tools::Rectangle& rHelpArea) override;
- virtual bool HidePopover(sal_uIntPtr nId) override;
+ virtual void* ShowPopover(const OUString& rHelpText, const tools::Rectangle& rHelpArea, QuickHelpFlags nFlags) override;
+ virtual bool UpdatePopover(void* nId, const OUString& rHelpText, const tools::Rectangle& rHelpArea) override;
+ virtual bool HidePopover(void* nId) override;
#endif
static GtkSalFrame *getFromWindow( GtkWindow *pWindow );
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index ebd861999667..081c3612abb8 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -191,10 +191,10 @@ void Help::HideBalloonAndQuickHelp()
ImplDestroyHelpWindow( bIsVisible );
}
-sal_uIntPtr Help::ShowPopover(vcl::Window* pParent, const tools::Rectangle& rScreenRect,
+void* Help::ShowPopover(vcl::Window* pParent, const tools::Rectangle& rScreenRect,
const OUString& rText, QuickHelpFlags nStyle)
{
- sal_uIntPtr nId = pParent->ImplGetFrame()->ShowPopover(rText, rScreenRect, nStyle);
+ void* nId = pParent->ImplGetFrame()->ShowPopover(rText, rScreenRect, nStyle);
if (nId)
{
//popovers are handled natively, return early
@@ -204,14 +204,14 @@ sal_uIntPtr Help::ShowPopover(vcl::Window* pParent, const tools::Rectangle& rScr
sal_uInt16 nHelpWinStyle = ( nStyle & QuickHelpFlags::TipStyleBalloon ) ? HELPWINSTYLE_BALLOON : HELPWINSTYLE_QUICK;
VclPtrInstance<HelpTextWindow> pHelpWin( pParent, rText, nHelpWinStyle, nStyle );
- nId = reinterpret_cast< sal_uIntPtr >( pHelpWin.get() );
+ nId = pHelpWin.get();
UpdatePopover(nId, pParent, rScreenRect, rText);
pHelpWin->ShowHelp( HELPDELAY_NONE );
return nId;
}
-void Help::UpdatePopover(sal_uIntPtr nId, vcl::Window* pParent, const tools::Rectangle& rScreenRect,
+void Help::UpdatePopover(void* nId, vcl::Window* pParent, const tools::Rectangle& rScreenRect,
const OUString& rText)
{
if (pParent->ImplGetFrame()->UpdatePopover(nId, rText, rScreenRect))
@@ -220,7 +220,7 @@ void Help::UpdatePopover(sal_uIntPtr nId, vcl::Window* pParent, const tools::Rec
return;
}
- HelpTextWindow* pHelpWin = reinterpret_cast< HelpTextWindow* >( nId );
+ HelpTextWindow* pHelpWin = static_cast< HelpTextWindow* >( nId );
ENSURE_OR_RETURN_VOID( pHelpWin != nullptr, "Help::UpdatePopover: invalid ID!" );
Size aSz = pHelpWin->CalcOutSize();
@@ -232,7 +232,7 @@ void Help::UpdatePopover(sal_uIntPtr nId, vcl::Window* pParent, const tools::Rec
pHelpWin->Invalidate();
}
-void Help::HidePopover(vcl::Window const * pParent, sal_uLong nId)
+void Help::HidePopover(vcl::Window const * pParent, void* nId)
{
if (pParent->ImplGetFrame()->HidePopover(nId))
{
@@ -240,7 +240,7 @@ void Help::HidePopover(vcl::Window const * pParent, sal_uLong nId)
return;
}
- VclPtr<HelpTextWindow> pHelpWin = reinterpret_cast<HelpTextWindow*>(nId);
+ VclPtr<HelpTextWindow> pHelpWin = static_cast<HelpTextWindow*>(nId);
vcl::Window* pFrameWindow = pHelpWin->ImplGetFrameWindow();
pHelpWin->Hide();
// trigger update, so that a Paint is instantly triggered since we do not save the background
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index c71a22852e72..b05e675aaf5a 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -2474,7 +2474,7 @@ namespace
}
}
-sal_uIntPtr GtkSalFrame::ShowPopover(const OUString& rHelpText, const tools::Rectangle& rHelpArea, QuickHelpFlags nFlags)
+void* GtkSalFrame::ShowPopover(const OUString& rHelpText, const tools::Rectangle& rHelpArea, QuickHelpFlags nFlags)
{
GtkWidget *pWidget = gtk_popover_new(getMouseEventWidget());
OString sUTF = OUStringToOString(rHelpText, RTL_TEXTENCODING_UTF8);
@@ -2496,12 +2496,12 @@ sal_uIntPtr GtkSalFrame::ShowPopover(const OUString& rHelpText, const tools::Rec
gtk_widget_show_all(pWidget);
- return reinterpret_cast<sal_uIntPtr>(pWidget);
+ return pWidget;
}
-bool GtkSalFrame::UpdatePopover(sal_uIntPtr nId, const OUString& rHelpText, const tools::Rectangle& rHelpArea)
+bool GtkSalFrame::UpdatePopover(void* nId, const OUString& rHelpText, const tools::Rectangle& rHelpArea)
{
- GtkWidget *pWidget = reinterpret_cast<GtkWidget*>(nId);
+ GtkWidget *pWidget = static_cast<GtkWidget*>(nId);
set_pointing_to(GTK_POPOVER(pWidget), rHelpArea, maGeometry);
@@ -2512,9 +2512,9 @@ bool GtkSalFrame::UpdatePopover(sal_uIntPtr nId, const OUString& rHelpText, cons
return true;
}
-bool GtkSalFrame::HidePopover(sal_uIntPtr nId)
+bool GtkSalFrame::HidePopover(void* nId)
{
- GtkWidget *pWidget = reinterpret_cast<GtkWidget*>(nId);
+ GtkWidget *pWidget = static_cast<GtkWidget*>(nId);
gtk_widget_destroy(pWidget);
return true;
}
commit 17da4ab25303902dd58f854cabce59f168404e2d
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Thu Dec 14 11:21:16 2017 +0200
sal_uIntPtr->sal_uInt32 in X11SalGraphicsImpl
which matches the call sites
Change-Id: I4db0c87f29c3368f32d600a10b5f43cb5ea6027c
Reviewed-on: https://gerrit.libreoffice.org/46483
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx
index 84dfdff69e07..9b4c9c31d0e7 100644
--- a/vcl/unx/generic/gdi/gdiimpl.cxx
+++ b/vcl/unx/generic/gdi/gdiimpl.cxx
@@ -473,7 +473,7 @@ GC X11SalGraphicsImpl::SelectPen()
return mpPenGC;
}
-void X11SalGraphicsImpl::DrawLines(sal_uLong nPoints,
+void X11SalGraphicsImpl::DrawLines(sal_uInt32 nPoints,
const SalPolyLine &rPoints,
GC pGC,
bool bClose)
diff --git a/vcl/unx/generic/gdi/gdiimpl.hxx b/vcl/unx/generic/gdi/gdiimpl.hxx
index fe4f47e51a94..3c7c98427034 100644
--- a/vcl/unx/generic/gdi/gdiimpl.hxx
+++ b/vcl/unx/generic/gdi/gdiimpl.hxx
@@ -85,7 +85,7 @@ private:
GC GetInvertGC();
GC GetInvert50GC();
- void DrawLines( sal_uIntPtr nPoints,
+ void DrawLines( sal_uInt32 nPoints,
const SalPolyLine &rPoints,
GC pGC,
bool bClose
commit fc7909cfd1e27b82ee44f3a11d46b2d080967329
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Thu Dec 14 11:18:06 2017 +0200
sal_uIntPtr->SwLinePortion* in SwTextPortionMap
which is the common base class of the two types we are using in that
map, SwLinePortion and SwTextPortion
Change-Id: Iff5b34124fc0655757f625f1daac8eb5b47bfe6d
Reviewed-on: https://gerrit.libreoffice.org/46482
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 8caa6131f302..bf8b7d666605 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -140,7 +140,7 @@ public:
class SwTextSizeInfo : public SwTextInfo
{
private:
- typedef std::map< sal_uIntPtr, sal_uInt16 > SwTextPortionMap;
+ typedef std::map< SwLinePortion const *, sal_uInt16 > SwTextPortionMap;
protected:
// during formatting, a small database is built, mapping portion pointers
@@ -306,13 +306,13 @@ public:
// space among compressed kanas.
// During formatting, the maximum values of compressable portions are
// stored in m_aMaxWidth and discarded after a line has been formatted.
- void SetMaxWidthDiff( const void *nKey, sal_uInt16 nVal )
+ void SetMaxWidthDiff( const SwLinePortion *nKey, sal_uInt16 nVal )
{
- m_aMaxWidth.insert( std::make_pair( reinterpret_cast<sal_uIntPtr>(nKey), nVal ) );
+ m_aMaxWidth.insert( std::make_pair( nKey, nVal ) );
};
- sal_uInt16 GetMaxWidthDiff( const void *nKey )
+ sal_uInt16 GetMaxWidthDiff( const SwLinePortion *nKey )
{
- SwTextPortionMap::iterator it = m_aMaxWidth.find( reinterpret_cast<sal_uIntPtr>(nKey) );
+ SwTextPortionMap::iterator it = m_aMaxWidth.find( nKey );
if( it != m_aMaxWidth.end() )
return it->second;
commit 8355734f3511f951972fa02e94f5d40052d873de
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Thu Dec 14 11:10:31 2017 +0200
sal_uIntPtr->sal_Int32 in SvxSuperContourDlg
Change-Id: I765cd20b16cbb832e4e0fe2beca4c6b89fec7e05
Reviewed-on: https://gerrit.libreoffice.org/46481
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index 22c8321d964d..9059030fc3ca 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -217,7 +217,7 @@ SvxSuperContourDlg::SvxSuperContourDlg(SfxBindings *_pBindings, SfxChildWindow *
pUpdateEditingObject( nullptr ),
pCheckObj ( nullptr ),
aContourItem ( *this, *_pBindings ),
- nGrfChanged ( 0 ),
+ mnGrfChanged ( 0 ),
bExecState ( false ),
bUpdateGraphicLinked( false ),
bGraphicLinked ( false )
@@ -345,7 +345,7 @@ void SvxSuperContourDlg::SetGraphic( const Graphic& rGraphic )
{
aUndoGraphic = aRedoGraphic = Graphic();
aGraphic = rGraphic;
- nGrfChanged = 0;
+ mnGrfChanged = 0;
m_pContourWnd->SetGraphic( aGraphic );
}
@@ -486,7 +486,7 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx, void )
}
else if (nId == mnUndoId)
{
- nGrfChanged = nGrfChanged ? nGrfChanged - 1 : 0UL;
+ mnGrfChanged = mnGrfChanged ? mnGrfChanged - 1 : 0;
aRedoGraphic = aGraphic;
aGraphic = aUndoGraphic;
aUndoGraphic = Graphic();
@@ -494,7 +494,7 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx, void )
}
else if (nId == mnRedoId)
{
- nGrfChanged++;
+ mnGrfChanged++;
aUndoGraphic = aGraphic;
aGraphic = aRedoGraphic;
aRedoGraphic = Graphic();
@@ -700,7 +700,7 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow&, rWnd, void )
aRedoGraphic = Graphic();
aUndoGraphic = aGraphic;
aGraphic = Graphic( BitmapEx( aBmp, aMask ) );
- nGrfChanged++;
+ mnGrfChanged++;
bNewContour = ( aQBox->Execute() == RET_YES );
rWnd.SetGraphic( aGraphic, bNewContour );
diff --git a/svx/source/dialog/contimp.hxx b/svx/source/dialog/contimp.hxx
index e3358b48ff9d..efc25ad375c7 100644
--- a/svx/source/dialog/contimp.hxx
+++ b/svx/source/dialog/contimp.hxx
@@ -59,7 +59,7 @@ class SvxSuperContourDlg : public SvxContourDlg
VclPtr<MetricField> m_pMtfTolerance;
VclPtr<ContourWindow> m_pContourWnd;
VclPtr<StatusBar> m_pStbStatus;
- sal_uIntPtr nGrfChanged;
+ sal_Int32 mnGrfChanged;
bool bExecState;
bool bUpdateGraphicLinked;
bool bGraphicLinked;
@@ -103,7 +103,7 @@ public:
void SetGraphic( const Graphic& rGraphic );
const Graphic& GetGraphic() const { return aGraphic; }
- bool IsGraphicChanged() const { return nGrfChanged > 0; }
+ bool IsGraphicChanged() const { return mnGrfChanged > 0; }
void SetPolyPolygon( const tools::PolyPolygon& rPolyPoly );
tools::PolyPolygon GetPolyPolygon();
commit bd79b7154dec6ad6bcc3aa5d875d22d01270e39f
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Thu Dec 14 11:06:52 2017 +0200
sal_uIntPtr->VclPtr<OutputDevice> in XParaPortionList
who knows we had to hide a pointer behind an integer type, but it's been
this way since forever
Change-Id: I9738e1137752cc8226877e2cf0291967b45dbf0e
Reviewed-on: https://gerrit.libreoffice.org/46480
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 8d210ceea975..59f1c17fcd0a 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -98,7 +98,7 @@ XParaPortionList::XParaPortionList(
OutputDevice* pRefDev, sal_uLong nPW, sal_uInt16 _nStretchX, sal_uInt16 _nStretchY) :
aRefMapMode(pRefDev->GetMapMode()), nStretchX(_nStretchX), nStretchY(_nStretchY)
{
- nRefDevPtr = reinterpret_cast<sal_uIntPtr>(pRefDev);
+ nRefDevPtr = pRefDev;
nPaperWidth = nPW;
eRefDevType = pRefDev->GetOutDevType();
}
diff --git a/editeng/source/editeng/editobj2.hxx b/editeng/source/editeng/editobj2.hxx
index f8645a5e93c4..44fc5ac82c47 100644
--- a/editeng/source/editeng/editobj2.hxx
+++ b/editeng/source/editeng/editobj2.hxx
@@ -96,7 +96,7 @@ class XParaPortionList
typedef std::vector<std::unique_ptr<XParaPortion> > ListType;
ListType maList;
- sal_uIntPtr nRefDevPtr;
+ VclPtr<OutputDevice> nRefDevPtr;
OutDevType eRefDevType;
MapMode aRefMapMode;
sal_uInt16 nStretchX;
@@ -109,7 +109,7 @@ public:
void push_back(XParaPortion* p);
const XParaPortion& operator[](size_t i) const;
- sal_uIntPtr GetRefDevPtr() const { return nRefDevPtr; }
+ OutputDevice* GetRefDevPtr() const { return nRefDevPtr; }
sal_uLong GetPaperWidth() const { return nPaperWidth; }
OutDevType GetRefDevType() const { return eRefDevType; }
const MapMode& GetRefMapMode() const { return aRefMapMode; }
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 14b9bd3aab6b..684cb969b04b 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1186,7 +1186,7 @@ EditSelection ImpEditEngine::InsertTextObject( const EditTextObject& rTextObject
&& ( pPortionInfo->GetStretchX() == nStretchX )
&& ( pPortionInfo->GetStretchY() == nStretchY ) )
{
- if ( ( pPortionInfo->GetRefDevPtr() == reinterpret_cast<sal_uIntPtr>(GetRefDevice()) ) ||
+ if ( ( pPortionInfo->GetRefDevPtr() == GetRefDevice() ) ||
( ( pPortionInfo->GetRefDevType() == OUTDEV_VIRDEV ) &&
( GetRefDevice()->GetOutDevType() == OUTDEV_VIRDEV ) ) )
bUsePortionInfo = true;
More information about the Libreoffice-commits
mailing list