summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-03 13:14:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-03 15:27:37 +0200
commit24817c26b3f8cc1a8156357316be442e5460a1a7 (patch)
treee361e25d9ca4cd269fde426ddba135d87d6aba67 /starmath
parentb9e9dde5ae6f8955b5e6584dd5d809c98bb66814 (diff)
loplugin:constparams in starmath
Change-Id: Iac470b572311241216622f22bc543c0bd10a28f6 Reviewed-on: https://gerrit.libreoffice.org/40714 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/cursor.hxx2
-rw-r--r--starmath/inc/document.hxx2
-rw-r--r--starmath/inc/node.hxx4
-rw-r--r--starmath/inc/view.hxx4
-rw-r--r--starmath/inc/visitors.hxx2
-rw-r--r--starmath/source/accessibility.cxx6
-rw-r--r--starmath/source/cursor.cxx2
-rw-r--r--starmath/source/document.cxx2
-rw-r--r--starmath/source/mathmlexport.cxx8
-rw-r--r--starmath/source/mathmlexport.hxx10
-rw-r--r--starmath/source/mathmlimport.cxx8
-rw-r--r--starmath/source/mathmlimport.hxx10
-rw-r--r--starmath/source/view.cxx4
-rw-r--r--starmath/source/visitors.cxx2
14 files changed, 33 insertions, 33 deletions
diff --git a/starmath/inc/cursor.hxx b/starmath/inc/cursor.hxx
index 72de1a1cbadb..476f021670e0 100644
--- a/starmath/inc/cursor.hxx
+++ b/starmath/inc/cursor.hxx
@@ -208,7 +208,7 @@ private:
*
* These are SmExpression, SmBinHorNode, SmUnHorNode etc.
*/
- static bool IsLineCompositionNode(SmNode* pNode);
+ static bool IsLineCompositionNode(SmNode const * pNode);
/** Count number of selected nodes, excluding line composition nodes
*
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index e18c674f2a69..04cb436b9d0e 100644
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -172,7 +172,7 @@ public:
void UpdateText();
void SetText(const OUString& rBuffer);
const OUString& GetText() { return maText; }
- void SetFormat(SmFormat& rFormat);
+ void SetFormat(SmFormat const & rFormat);
const SmFormat& GetFormat() { return maFormat; }
void Parse();
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index b7a7efe371f4..0abc3736111a 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -202,7 +202,7 @@ public:
}
/** Set the token for this node */
- void SetToken(SmToken& token){
+ void SetToken(SmToken const & token){
maNodeToken = token;
}
@@ -249,7 +249,7 @@ public:
*
* Returns -1, if pSubNode isn't a subnode of this.
*/
- int IndexOfSubNode(SmNode* pSubNode)
+ int IndexOfSubNode(SmNode const * pSubNode)
{
sal_uInt16 nSize = GetNumSubNodes();
for(sal_uInt16 i = 0; i < nSize; i++)
diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index e06f85cde4c8..9667d09e30ef 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -236,9 +236,9 @@ class SmViewShell: public SfxViewShell
bool mbInsertIntoEditWindow;
protected:
- static Size GetTextLineSize(OutputDevice& rDevice,
+ static Size GetTextLineSize(OutputDevice const & rDevice,
const OUString& rLine);
- static Size GetTextSize(OutputDevice& rDevice,
+ static Size GetTextSize(OutputDevice const & rDevice,
const OUString& rText,
long MaxWidth);
static void DrawTextLine(OutputDevice& rDevice,
diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx
index 63271613f10f..6f3b17e733c6 100644
--- a/starmath/inc/visitors.hxx
+++ b/starmath/inc/visitors.hxx
@@ -372,7 +372,7 @@ private:
/** Clone children of pSource and give them to pTarget */
void CloneKids( SmStructureNode* pSource, SmStructureNode* pTarget );
/** Clone attributes on a pNode */
- static void CloneNodeAttr( SmNode* pSource, SmNode* pTarget );
+ static void CloneNodeAttr( SmNode const * pSource, SmNode* pTarget );
};
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index 5d7c08f60a00..60c7d0b916c4 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -65,7 +65,7 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::accessibility;
-static awt::Rectangle lcl_GetBounds( vcl::Window *pWin )
+static awt::Rectangle lcl_GetBounds( vcl::Window const *pWin )
{
// !! see VCLXAccessibleComponent::implGetBounds()
@@ -92,7 +92,7 @@ static awt::Rectangle lcl_GetBounds( vcl::Window *pWin )
return aBounds;
}
-static awt::Point lcl_GetLocationOnScreen( vcl::Window *pWin )
+static awt::Point lcl_GetLocationOnScreen( vcl::Window const *pWin )
{
// !! see VCLXAccessibleComponent::getLocationOnScreen()
@@ -1038,7 +1038,7 @@ void SmTextForwarder::FieldClicked(const SvxFieldItem&, sal_Int32, sal_Int32)
{
}
-static SfxItemState GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, sal_uInt16 nWhich )
+static SfxItemState GetSvxEditEngineItemState( EditEngine const & rEditEngine, const ESelection& rSel, sal_uInt16 nWhich )
{
std::vector<EECharAttrib> aAttribs;
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index 56f43eccaddf..4ed4ffde1145 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -1173,7 +1173,7 @@ void SmCursor::CloneLineToClipboard(SmStructureNode* pLine, SmClipboard* pClipbo
}
}
-bool SmCursor::IsLineCompositionNode(SmNode* pNode){
+bool SmCursor::IsLineCompositionNode(SmNode const * pNode){
switch(pNode->GetType()){
case SmNodeType::Line:
case SmNodeType::UnHor:
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index e6a04cde82bb..eeba3a2a47a0 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -176,7 +176,7 @@ void SmDocShell::SetText(const OUString& rBuffer)
}
}
-void SmDocShell::SetFormat(SmFormat& rFormat)
+void SmDocShell::SetFormat(SmFormat const & rFormat)
{
maFormat = rFormat;
SetFormulaArranged( false );
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index f26b6d7d9725..003d583c03c5 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -241,8 +241,8 @@ bool SmXMLExportWrapper::Export(SfxMedium &rMedium)
bool SmXMLExportWrapper::WriteThroughComponent(
const Reference<io::XOutputStream>& xOutputStream,
const Reference<XComponent>& xComponent,
- Reference<uno::XComponentContext> & rxContext,
- Reference<beans::XPropertySet> & rPropSet,
+ Reference<uno::XComponentContext> const & rxContext,
+ Reference<beans::XPropertySet> const & rPropSet,
const sal_Char* pComponentName )
{
OSL_ENSURE(xOutputStream.is(), "I really need an output stream!");
@@ -293,8 +293,8 @@ bool SmXMLExportWrapper::WriteThroughComponent(
const Reference < embed::XStorage >& xStorage,
const Reference<XComponent>& xComponent,
const sal_Char* pStreamName,
- Reference<uno::XComponentContext> & rxContext,
- Reference<beans::XPropertySet> & rPropSet,
+ Reference<uno::XComponentContext> const & rxContext,
+ Reference<beans::XPropertySet> const & rPropSet,
const sal_Char* pComponentName
)
{
diff --git a/starmath/source/mathmlexport.hxx b/starmath/source/mathmlexport.hxx
index bb0a5e097fa0..62139209cce5 100644
--- a/starmath/source/mathmlexport.hxx
+++ b/starmath/source/mathmlexport.hxx
@@ -40,7 +40,7 @@ class SmXMLExportWrapper
bool bFlat; //set true for export to flat .mml, set false for
//export to a .sxm (or whatever) package
public:
- explicit SmXMLExportWrapper(css::uno::Reference<css::frame::XModel> &rRef)
+ explicit SmXMLExportWrapper(css::uno::Reference<css::frame::XModel> const &rRef)
: xModel(rRef), bFlat(true) {}
bool Export(SfxMedium &rMedium);
@@ -49,16 +49,16 @@ public:
static bool WriteThroughComponent(
const css::uno::Reference< css::io::XOutputStream >& xOutputStream,
const css::uno::Reference< css::lang::XComponent >& xComponent,
- css::uno::Reference< css::uno::XComponentContext > & rxContext,
- css::uno::Reference< css::beans::XPropertySet > & rPropSet,
+ css::uno::Reference< css::uno::XComponentContext > const & rxContext,
+ css::uno::Reference< css::beans::XPropertySet > const & rPropSet,
const sal_Char* pComponentName );
static bool WriteThroughComponent(
const css::uno::Reference< css::embed::XStorage >& xStor,
const css::uno::Reference< css::lang::XComponent >& xComponent,
const sal_Char* pStreamName,
- css::uno::Reference< css::uno::XComponentContext > & rxContext,
- css::uno::Reference< css::beans::XPropertySet > & rPropSet,
+ css::uno::Reference< css::uno::XComponentContext > const & rxContext,
+ css::uno::Reference< css::beans::XPropertySet > const & rPropSet,
const sal_Char* pComponentName );
};
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 930ff81b506f..5eac14f28977 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -246,8 +246,8 @@ ErrCode SmXMLImportWrapper::Import(SfxMedium &rMedium)
ErrCode SmXMLImportWrapper::ReadThroughComponent(
const Reference<io::XInputStream>& xInputStream,
const Reference<XComponent>& xModelComponent,
- Reference<uno::XComponentContext> & rxContext,
- Reference<beans::XPropertySet> & rPropSet,
+ Reference<uno::XComponentContext> const & rxContext,
+ Reference<beans::XPropertySet> const & rPropSet,
const sal_Char* pFilterName,
bool bEncrypted )
{
@@ -344,8 +344,8 @@ ErrCode SmXMLImportWrapper::ReadThroughComponent(
const Reference<XComponent>& xModelComponent,
const sal_Char* pStreamName,
const sal_Char* pCompatibilityStreamName,
- Reference<uno::XComponentContext> & rxContext,
- Reference<beans::XPropertySet> & rPropSet,
+ Reference<uno::XComponentContext> const & rxContext,
+ Reference<beans::XPropertySet> const & rPropSet,
const sal_Char* pFilterName )
{
OSL_ENSURE(xStorage.is(), "Need storage!");
diff --git a/starmath/source/mathmlimport.hxx b/starmath/source/mathmlimport.hxx
index c0e43d8cd83a..4db626df4d0a 100644
--- a/starmath/source/mathmlimport.hxx
+++ b/starmath/source/mathmlimport.hxx
@@ -40,7 +40,7 @@ class SmXMLImportWrapper
css::uno::Reference<css::frame::XModel> xModel;
public:
- explicit SmXMLImportWrapper(css::uno::Reference<css::frame::XModel> &rRef)
+ explicit SmXMLImportWrapper(css::uno::Reference<css::frame::XModel> const &rRef)
: xModel(rRef) {}
ErrCode Import(SfxMedium &rMedium);
@@ -48,8 +48,8 @@ public:
static ErrCode ReadThroughComponent(
const css::uno::Reference< css::io::XInputStream >& xInputStream,
const css::uno::Reference< css::lang::XComponent >& xModelComponent,
- css::uno::Reference< css::uno::XComponentContext > & rxContext,
- css::uno::Reference< css::beans::XPropertySet > & rPropSet,
+ css::uno::Reference< css::uno::XComponentContext > const & rxContext,
+ css::uno::Reference< css::beans::XPropertySet > const & rPropSet,
const sal_Char* pFilterName,
bool bEncrypted );
@@ -58,8 +58,8 @@ public:
const css::uno::Reference< css::lang::XComponent >& xModelComponent,
const sal_Char* pStreamName,
const sal_Char* pCompatibilityStreamName,
- css::uno::Reference< css::uno::XComponentContext > & rxContext,
- css::uno::Reference< css::beans::XPropertySet > & rPropSet,
+ css::uno::Reference< css::uno::XComponentContext > const & rxContext,
+ css::uno::Reference< css::beans::XPropertySet > const & rPropSet,
const sal_Char* pFilterName );
};
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 81ad79e51f70..5da095811a68 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -920,7 +920,7 @@ void SmViewShell::SetZoomFactor( const Fraction &rX, const Fraction &rY )
SfxViewShell::SetZoomFactor( rX, rY );
}
-Size SmViewShell::GetTextLineSize(OutputDevice& rDevice, const OUString& rLine)
+Size SmViewShell::GetTextLineSize(OutputDevice const & rDevice, const OUString& rLine)
{
Size aSize(rDevice.GetTextWidth(rLine), rDevice.GetTextHeight());
const long nTabPos = rLine.isEmpty() ? 0 : rDevice.approximate_char_width() * 8;
@@ -943,7 +943,7 @@ Size SmViewShell::GetTextLineSize(OutputDevice& rDevice, const OUString& rLine)
return aSize;
}
-Size SmViewShell::GetTextSize(OutputDevice& rDevice, const OUString& rText, long MaxWidth)
+Size SmViewShell::GetTextSize(OutputDevice const & rDevice, const OUString& rText, long MaxWidth)
{
Size aSize;
Size aTextSize;
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index 11606f74005f..a2437be9edc4 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -1600,7 +1600,7 @@ SmNode* SmCloningVisitor::Clone( SmNode* pNode )
return pClone;
}
-void SmCloningVisitor::CloneNodeAttr( SmNode* pSource, SmNode* pTarget )
+void SmCloningVisitor::CloneNodeAttr( SmNode const * pSource, SmNode* pTarget )
{
pTarget->SetScaleMode( pSource->GetScaleMode( ) );
//Other attributes are set when prepare or arrange is executed