Kaydet (Commit) c2bf0d06 authored tarafından Miklos Vajna's avatar Miklos Vajna

starmath, sw: fix inconsistent param naming in interface/implementation

At least some of them.

Change-Id: I69d4b0b000efec863bf66e9719b57e881ff23689
Reviewed-on: https://gerrit.libreoffice.org/40596Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 4a4412f7
...@@ -40,7 +40,7 @@ public: ...@@ -40,7 +40,7 @@ public:
// XServiceInfo // XServiceInfo
OUString SAL_CALL getImplementationName() override; OUString SAL_CALL getImplementationName() override;
sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; sal_Bool SAL_CALL supportsService(const OUString& rServiceName) override;
uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override; uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
}; };
......
...@@ -22,8 +22,8 @@ class SwTextNode; ...@@ -22,8 +22,8 @@ class SwTextNode;
class SW_DLLPUBLIC SwRDFHelper class SW_DLLPUBLIC SwRDFHelper
{ {
public: public:
/// Gets all (rTextNode, key, value) statements in RDF graphs of type rType. /// Gets all (rNode, key, value) statements in RDF graphs of type rType.
static std::map<OUString, OUString> getTextNodeStatements(const OUString& rType, const SwTextNode& rTextNode); static std::map<OUString, OUString> getTextNodeStatements(const OUString& rType, const SwTextNode& rNode);
/// Add an (rTextNode, key, value) statement in the graph of type rType -- or if it does not exist, create a graph at rPath first. /// Add an (rTextNode, key, value) statement in the graph of type rType -- or if it does not exist, create a graph at rPath first.
static void addTextNodeStatement(const OUString& rType, const OUString& rPath, SwTextNode& rTextNode, const OUString& rKey, const OUString& rValue); static void addTextNodeStatement(const OUString& rType, const OUString& rPath, SwTextNode& rTextNode, const OUString& rKey, const OUString& rValue);
}; };
......
...@@ -127,23 +127,23 @@ void SwTextBoxHelper::destroy(SwFrameFormat* pShape) ...@@ -127,23 +127,23 @@ void SwTextBoxHelper::destroy(SwFrameFormat* pShape)
} }
} }
bool SwTextBoxHelper::isTextBox(const SwFrameFormat* pShape, sal_uInt16 nType) bool SwTextBoxHelper::isTextBox(const SwFrameFormat* pFormat, sal_uInt16 nType)
{ {
assert(nType == RES_FLYFRMFMT || nType == RES_DRAWFRMFMT); assert(nType == RES_FLYFRMFMT || nType == RES_DRAWFRMFMT);
if (!pShape || pShape->Which() != nType || !pShape->GetAttrSet().HasItem(RES_CNTNT)) if (!pFormat || pFormat->Which() != nType || !pFormat->GetAttrSet().HasItem(RES_CNTNT))
return false; return false;
sal_uInt16 nOtherType = (pShape->Which() == RES_FLYFRMFMT) ? RES_DRAWFRMFMT : RES_FLYFRMFMT; sal_uInt16 nOtherType = (pFormat->Which() == RES_FLYFRMFMT) ? RES_DRAWFRMFMT : RES_FLYFRMFMT;
SwFrameFormat* pFormat = pShape->GetOtherTextBoxFormat(); SwFrameFormat* pOtherFormat = pFormat->GetOtherTextBoxFormat();
if (!pFormat) if (!pOtherFormat)
return false; return false;
assert(pFormat->Which() == nOtherType); assert(pOtherFormat->Which() == nOtherType);
if (pFormat->Which() != nOtherType) if (pOtherFormat->Which() != nOtherType)
return false; return false;
const SwFormatContent& rContent = pShape->GetContent(); const SwFormatContent& rContent = pFormat->GetContent();
return pFormat->GetAttrSet().HasItem(RES_CNTNT) && pFormat->GetContent() == rContent; return pOtherFormat->GetAttrSet().HasItem(RES_CNTNT) && pOtherFormat->GetContent() == rContent;
} }
bool SwTextBoxHelper::isTextBox(const SdrObject* pObject) bool SwTextBoxHelper::isTextBox(const SdrObject* pObject)
...@@ -362,24 +362,24 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, const OUString& rPrope ...@@ -362,24 +362,24 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, const OUString& rPrope
syncProperty(pShape, RES_BOX, BOTTOM_BORDER_DISTANCE, rValue); syncProperty(pShape, RES_BOX, BOTTOM_BORDER_DISTANCE, rValue);
} }
void SwTextBoxHelper::getProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_uInt8 nMemberId, css::uno::Any& rValue) void SwTextBoxHelper::getProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_uInt8 nMemberID, css::uno::Any& rValue)
{ {
if (!pShape) if (!pShape)
return; return;
nMemberId &= ~CONVERT_TWIPS; nMemberID &= ~CONVERT_TWIPS;
if (SwFrameFormat* pFormat = getOtherTextBoxFormat(pShape, RES_DRAWFRMFMT)) if (SwFrameFormat* pFormat = getOtherTextBoxFormat(pShape, RES_DRAWFRMFMT))
{ {
if (nWID == RES_CHAIN) if (nWID == RES_CHAIN)
{ {
switch (nMemberId) switch (nMemberID)
{ {
case MID_CHAIN_PREVNAME: case MID_CHAIN_PREVNAME:
case MID_CHAIN_NEXTNAME: case MID_CHAIN_NEXTNAME:
{ {
const SwFormatChain& rChain = pFormat->GetChain(); const SwFormatChain& rChain = pFormat->GetChain();
rChain.QueryValue(rValue, nMemberId); rChain.QueryValue(rValue, nMemberID);
} }
break; break;
case MID_CHAIN_NAME: case MID_CHAIN_NAME:
...@@ -390,14 +390,14 @@ void SwTextBoxHelper::getProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_uI ...@@ -390,14 +390,14 @@ void SwTextBoxHelper::getProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_uI
} }
} }
void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_uInt8 nMemberId, const css::uno::Any& rValue) void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_uInt8 nMemberID, const css::uno::Any& rValue)
{ {
// No shape yet? Then nothing to do, initial properties are set by create(). // No shape yet? Then nothing to do, initial properties are set by create().
if (!pShape) if (!pShape)
return; return;
uno::Any aValue(rValue); uno::Any aValue(rValue);
nMemberId &= ~CONVERT_TWIPS; nMemberID &= ~CONVERT_TWIPS;
if (SwFrameFormat* pFormat = getOtherTextBoxFormat(pShape, RES_DRAWFRMFMT)) if (SwFrameFormat* pFormat = getOtherTextBoxFormat(pShape, RES_DRAWFRMFMT))
{ {
...@@ -408,7 +408,7 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_u ...@@ -408,7 +408,7 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_u
switch (nWID) switch (nWID)
{ {
case RES_HORI_ORIENT: case RES_HORI_ORIENT:
switch (nMemberId) switch (nMemberID)
{ {
case MID_HORIORIENT_ORIENT: case MID_HORIORIENT_ORIENT:
aPropertyName = UNO_NAME_HORI_ORIENT; aPropertyName = UNO_NAME_HORI_ORIENT;
...@@ -423,7 +423,7 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_u ...@@ -423,7 +423,7 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_u
} }
break; break;
case RES_VERT_ORIENT: case RES_VERT_ORIENT:
switch (nMemberId) switch (nMemberID)
{ {
case MID_VERTORIENT_ORIENT: case MID_VERTORIENT_ORIENT:
aPropertyName = UNO_NAME_VERT_ORIENT; aPropertyName = UNO_NAME_VERT_ORIENT;
...@@ -438,7 +438,7 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_u ...@@ -438,7 +438,7 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_u
} }
break; break;
case RES_FRM_SIZE: case RES_FRM_SIZE:
switch (nMemberId) switch (nMemberID)
{ {
case MID_FRMSIZE_IS_AUTO_HEIGHT: case MID_FRMSIZE_IS_AUTO_HEIGHT:
aPropertyName = UNO_NAME_FRAME_ISAUTOMATIC_HEIGHT; aPropertyName = UNO_NAME_FRAME_ISAUTOMATIC_HEIGHT;
...@@ -456,7 +456,7 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_u ...@@ -456,7 +456,7 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_u
} }
break; break;
case RES_ANCHOR: case RES_ANCHOR:
switch (nMemberId) switch (nMemberID)
{ {
case MID_ANCHOR_ANCHORTYPE: case MID_ANCHOR_ANCHORTYPE:
if (aValue.get<text::TextContentAnchorType>() == text::TextContentAnchorType_AS_CHARACTER) if (aValue.get<text::TextContentAnchorType>() == text::TextContentAnchorType_AS_CHARACTER)
...@@ -484,7 +484,7 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_u ...@@ -484,7 +484,7 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_u
} }
break; break;
case RES_CHAIN: case RES_CHAIN:
switch (nMemberId) switch (nMemberID)
{ {
case MID_CHAIN_PREVNAME: case MID_CHAIN_PREVNAME:
aPropertyName = UNO_NAME_CHAIN_PREV_NAME; aPropertyName = UNO_NAME_CHAIN_PREV_NAME;
...@@ -498,7 +498,7 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_u ...@@ -498,7 +498,7 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_u
aPropertyName = UNO_NAME_TEXT_VERT_ADJUST; aPropertyName = UNO_NAME_TEXT_VERT_ADJUST;
break; break;
case RES_BOX: case RES_BOX:
switch (nMemberId) switch (nMemberID)
{ {
case LEFT_BORDER_DISTANCE: case LEFT_BORDER_DISTANCE:
aPropertyName = UNO_NAME_LEFT_BORDER_DISTANCE; aPropertyName = UNO_NAME_LEFT_BORDER_DISTANCE;
...@@ -564,17 +564,17 @@ void SwTextBoxHelper::saveLinks(const SwFrameFormats& rFormats, std::map<const S ...@@ -564,17 +564,17 @@ void SwTextBoxHelper::saveLinks(const SwFrameFormats& rFormats, std::map<const S
} }
} }
void SwTextBoxHelper::resetLink(SwFrameFormat* pShape, std::map<const SwFrameFormat*, SwFormatContent>& rMap) void SwTextBoxHelper::resetLink(SwFrameFormat* pShape, std::map<const SwFrameFormat*, SwFormatContent>& rOldContent)
{ {
if (pShape->Which() == RES_DRAWFRMFMT) if (pShape->Which() == RES_DRAWFRMFMT)
{ {
if (pShape->GetContent().GetContentIdx()) if (pShape->GetContent().GetContentIdx())
rMap.insert(std::make_pair(pShape, pShape->GetContent())); rOldContent.insert(std::make_pair(pShape, pShape->GetContent()));
pShape->ResetFormatAttr(RES_CNTNT); pShape->ResetFormatAttr(RES_CNTNT);
} }
} }
void SwTextBoxHelper::restoreLinks(std::set<ZSortFly>& rOld, std::vector<SwFrameFormat*>& rNew, SavedLink& rSavedLinks, SavedContent& rOldContent) void SwTextBoxHelper::restoreLinks(std::set<ZSortFly>& rOld, std::vector<SwFrameFormat*>& rNew, SavedLink& rSavedLinks, SavedContent& rResetContent)
{ {
std::size_t i = 0; std::size_t i = 0;
for (auto aSetIt = rOld.begin(); aSetIt != rOld.end(); ++aSetIt, ++i) for (auto aSetIt = rOld.begin(); aSetIt != rOld.end(); ++aSetIt, ++i)
...@@ -589,8 +589,8 @@ void SwTextBoxHelper::restoreLinks(std::set<ZSortFly>& rOld, std::vector<SwFrame ...@@ -589,8 +589,8 @@ void SwTextBoxHelper::restoreLinks(std::set<ZSortFly>& rOld, std::vector<SwFrame
rNew[i]->SetFormatAttr(rNew[j]->GetContent()); rNew[i]->SetFormatAttr(rNew[j]->GetContent());
} }
} }
if (rOldContent.find(aSetIt->GetFormat()) != rOldContent.end()) if (rResetContent.find(aSetIt->GetFormat()) != rResetContent.end())
const_cast<SwFrameFormat*>(aSetIt->GetFormat())->SetFormatAttr(rOldContent[aSetIt->GetFormat()]); const_cast<SwFrameFormat*>(aSetIt->GetFormat())->SetFormatAttr(rResetContent[aSetIt->GetFormat()]);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment