[Libreoffice-commits] core.git: sw/source
Noel Grandin
noel.grandin at collabora.co.uk
Fri Apr 21 07:16:17 UTC 2017
sw/source/uibase/dochdl/swdtflvr.cxx | 6 +++---
sw/source/uibase/inc/swdtflvr.hxx | 6 +++---
sw/source/uibase/inc/wrtsh.hxx | 2 +-
sw/source/uibase/shells/basesh.cxx | 2 +-
sw/source/uibase/wrtsh/wrtsh1.cxx | 6 +++---
5 files changed, 11 insertions(+), 11 deletions(-)
New commits:
commit 42b2c0042b04184c94fb7cba3f301d394d21274e
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Thu Apr 20 12:27:25 2017 +0200
pass RndStdIds around instead of sal_uInt16
Change-Id: I28c85b8a5370faa06043ad93412897778ed1a619
Reviewed-on: https://gerrit.libreoffice.org/36731
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 27171bf0e836..5e8827da34e5 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -1132,7 +1132,7 @@ bool SwTransferable::IsPaste( const SwWrtShell& rSh,
return bIsPaste;
}
-bool SwTransferable::Paste(SwWrtShell& rSh, TransferableDataHelper& rData, sal_uInt16 nAnchorType)
+bool SwTransferable::Paste(SwWrtShell& rSh, TransferableDataHelper& rData, RndStdIds nAnchorType)
{
sal_uInt8 nEventAction, nAction=0;
SotExchangeDest nDestination = SwTransferable::GetSotDestination( rSh );
@@ -1189,7 +1189,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData,
SotExchangeDest nDestination, bool bIsPasteFormat,
bool bIsDefault,
const Point* pPt, sal_Int8 nDropAction,
- bool bPasteSelection, sal_uInt16 nAnchorType )
+ bool bPasteSelection, RndStdIds nAnchorType )
{
SwWait aWait( *rSh.GetView().GetDocShell(), false );
std::unique_ptr<SwTrnsfrActionAndUndo> pAction;
@@ -2246,7 +2246,7 @@ bool SwTransferable::PasteSdrFormat( TransferableDataHelper& rData,
bool SwTransferable::PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
SotClipboardFormatId nFormat, SwPasteSdr nAction, const Point* pPt,
- SotExchangeActionFlags nActionFlags, sal_Int8 nDropAction, bool bNeedToSelectBeforePaste, sal_uInt16 nAnchorType )
+ SotExchangeActionFlags nActionFlags, sal_Int8 nDropAction, bool bNeedToSelectBeforePaste, RndStdIds nAnchorType )
{
bool bRet = false;
diff --git a/sw/source/uibase/inc/swdtflvr.hxx b/sw/source/uibase/inc/swdtflvr.hxx
index bd84f3b551e5..c2f03e731f3b 100644
--- a/sw/source/uibase/inc/swdtflvr.hxx
+++ b/sw/source/uibase/inc/swdtflvr.hxx
@@ -106,7 +106,7 @@ class SW_DLLPUBLIC SwTransferable : public TransferableHelper
static bool PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
SotClipboardFormatId nFormat, SwPasteSdr nAction, const Point* pPt,
- SotExchangeActionFlags nActionFlags, sal_Int8 nDropAction, bool bNeedToSelectBeforePaste, sal_uInt16 nAnchorType = 0 );
+ SotExchangeActionFlags nActionFlags, sal_Int8 nDropAction, bool bNeedToSelectBeforePaste, RndStdIds nAnchorType = RndStdIds::FLY_AT_PARA );
static bool PasteImageMap( TransferableDataHelper& rData,
SwWrtShell& rSh );
@@ -169,14 +169,14 @@ public:
// paste - methods and helper methods for the paste
static bool IsPaste( const SwWrtShell&, const TransferableDataHelper& );
- static bool Paste( SwWrtShell&, TransferableDataHelper&, sal_uInt16 nAnchorType = 0 );
+ static bool Paste( SwWrtShell&, TransferableDataHelper&, RndStdIds nAnchorType = RndStdIds::FLY_AT_PARA );
static bool PasteData( TransferableDataHelper& rData,
SwWrtShell& rSh, sal_uInt8 nAction, SotExchangeActionFlags nActionFlags,
SotClipboardFormatId nFormat,
SotExchangeDest nDestination, bool bIsPasteFormat,
bool bIsDefault,
const Point* pDDPos = nullptr, sal_Int8 nDropAction = 0,
- bool bPasteSelection = false, sal_uInt16 nAnchorType = 0 );
+ bool bPasteSelection = false, RndStdIds nAnchorType = RndStdIds::FLY_AT_PARA );
static bool IsPasteSpecial( const SwWrtShell& rWrtShell,
const TransferableDataHelper& );
diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx
index 45e9ec7a71bd..497f9e9c7b2f 100644
--- a/sw/source/uibase/inc/wrtsh.hxx
+++ b/sw/source/uibase/inc/wrtsh.hxx
@@ -295,7 +295,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
// graphic
void Insert( const OUString &rPath, const OUString &rFilter,
const Graphic &, SwFlyFrameAttrMgr * = nullptr,
- sal_uInt16 nAnchorType = 0);
+ RndStdIds nAnchorType = RndStdIds::FLY_AT_PARA);
void InsertByWord( const OUString & );
void InsertPageBreak(const OUString *pPageDesc = nullptr, const ::boost::optional<sal_uInt16>& rPgNum = boost::none);
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index f0b6b5775965..2f3db3361dbb 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -288,7 +288,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
const SfxUInt16Item* pAnchorType = rReq.GetArg<SfxUInt16Item>(FN_PARAM_1);
if (pAnchorType)
- SwTransferable::Paste(rSh, aDataHelper, pAnchorType->GetValue());
+ SwTransferable::Paste(rSh, aDataHelper, static_cast<RndStdIds>(pAnchorType->GetValue()));
else
SwTransferable::Paste(rSh, aDataHelper);
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 79c2f893be64..d37bfcd7a1d7 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -239,7 +239,7 @@ void SwWrtShell::Insert( const OUString &rStr )
void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter,
const Graphic &rGrf, SwFlyFrameAttrMgr *pFrameMgr,
- sal_uInt16 nAnchorType )
+ RndStdIds nAnchorType )
{
ResetCursorStack();
if ( !CanInsert() )
@@ -275,9 +275,9 @@ void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter,
// These must be removed explicitly for the optimal size.
pFrameMgr->DelAttr(RES_FRM_SIZE);
- if (nAnchorType != 0)
+ if (nAnchorType != RndStdIds::FLY_AT_PARA)
// Something other than at-para was requested.
- pFrameMgr->SetAnchor(static_cast<RndStdIds>(nAnchorType));
+ pFrameMgr->SetAnchor(nAnchorType);
}
else
{
More information about the Libreoffice-commits
mailing list