summaryrefslogtreecommitdiff
path: root/starmath/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-05 13:11:02 +0200
committerNoel Grandin <noel@peralex.com>2015-05-05 14:05:20 +0200
commit0a442d38157190c77eb04d53a90520913b93226c (patch)
tree098c26d65ed949ec67ee92aebf0ce44b11914471 /starmath/source
parent7d426e6fd681c6f0fb45a69f3ac7076817495135 (diff)
loplugin:staticmethods
Change-Id: I4d19f868a618cb135aa7a949222972dc35b47d2a
Diffstat (limited to 'starmath/source')
-rw-r--r--starmath/source/document.cxx2
-rw-r--r--starmath/source/edit.cxx2
-rw-r--r--starmath/source/mathmlexport.hxx4
-rw-r--r--starmath/source/mathmlimport.hxx4
-rw-r--r--starmath/source/mathtype.hxx12
-rw-r--r--starmath/source/node.cxx4
-rw-r--r--starmath/source/parse.cxx6
-rw-r--r--starmath/source/smmod.cxx8
-rw-r--r--starmath/source/symbol.cxx6
-rw-r--r--starmath/source/unomodel.cxx2
-rw-r--r--starmath/source/utility.cxx2
-rw-r--r--starmath/source/view.cxx2
12 files changed, 25 insertions, 29 deletions
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 150e748cf782..0ff0caa9b55f 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -1272,7 +1272,7 @@ void SmDocShell::Draw(OutputDevice *pDevice,
DrawFormula(*pDevice, atmppoint);
}
-SfxItemPool& SmDocShell::GetPool() const
+SfxItemPool& SmDocShell::GetPool()
{
return SfxGetpApp()->GetPool();
}
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 2f0ad530ad37..1167cf6e5a60 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -909,7 +909,7 @@ void SmEditWindow::SelPrevMark()
}
}
-bool SmEditWindow::HasMark(const OUString& rText) const
+bool SmEditWindow::HasMark(const OUString& rText)
// returns true iff 'rText' contains a mark
{
return rText.indexOf("<?>") != -1;
diff --git a/starmath/source/mathmlexport.hxx b/starmath/source/mathmlexport.hxx
index c7f38b364890..9d63eaa17911 100644
--- a/starmath/source/mathmlexport.hxx
+++ b/starmath/source/mathmlexport.hxx
@@ -50,7 +50,7 @@ public:
bool Export(SfxMedium &rMedium);
void SetFlat(bool bIn) {bFlat = bIn;}
- bool WriteThroughComponent(
+ static bool WriteThroughComponent(
::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >
xOutputStream,
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
@@ -61,7 +61,7 @@ public:
::com::sun::star::beans::XPropertySet > & rPropSet,
const sal_Char* pComponentName );
- bool WriteThroughComponent(
+ static bool WriteThroughComponent(
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStor,
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xComponent,
const sal_Char* pStreamName,
diff --git a/starmath/source/mathmlimport.hxx b/starmath/source/mathmlimport.hxx
index 9254273c56bb..0629ce5927ed 100644
--- a/starmath/source/mathmlimport.hxx
+++ b/starmath/source/mathmlimport.hxx
@@ -48,7 +48,7 @@ public:
sal_uLong Import(SfxMedium &rMedium);
- sal_uLong ReadThroughComponent(
+ static sal_uLong ReadThroughComponent(
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xInputStream,
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xModelComponent,
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rxContext,
@@ -57,7 +57,7 @@ public:
const sal_Char* pFilterName,
bool bEncrypted );
- sal_uLong ReadThroughComponent(
+ static sal_uLong ReadThroughComponent(
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xModelComponent,
const sal_Char* pStreamName,
diff --git a/starmath/source/mathtype.hxx b/starmath/source/mathtype.hxx
index e4bb10d06677..a5698320e5cb 100644
--- a/starmath/source/mathtype.hxx
+++ b/starmath/source/mathtype.hxx
@@ -141,12 +141,12 @@ private:
sal_uInt8 nTag,sal_uInt8 nSelector,sal_uInt8 nVariation,
bool bSilent);
void HandleNudge();
- int xfLMOVE(sal_uInt8 nTest) const {return nTest&0x80;}
- int xfAUTO(sal_uInt8 nTest) const {return nTest&0x10;}
- int xfEMBELL(sal_uInt8 nTest) const {return nTest&0x20;}
- int xfNULL(sal_uInt8 nTest) const {return nTest&0x10;}
- int xfLSPACE(sal_uInt8 nTest) const {return nTest&0x40;}
- int xfRULER(sal_uInt8 nTest) const {return nTest&0x20;}
+ static int xfLMOVE(sal_uInt8 nTest) {return nTest&0x80;}
+ static int xfAUTO(sal_uInt8 nTest) {return nTest&0x10;}
+ static int xfEMBELL(sal_uInt8 nTest) {return nTest&0x20;}
+ static int xfNULL(sal_uInt8 nTest) {return nTest&0x10;}
+ static int xfLSPACE(sal_uInt8 nTest) {return nTest&0x40;}
+ static int xfRULER(sal_uInt8 nTest) {return nTest&0x20;}
void HandleNodes(SmNode *pNode,int nLevel=0);
int StartTemplate(sal_uInt16 nSelector,sal_uInt16 nVariation=0);
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 70bc753c0f9b..311df24840ca 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -935,7 +935,7 @@ void SmUnHorNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
void SmRootNode::GetHeightVerOffset(const SmRect &rRect,
- long &rHeight, long &rVerOffset) const
+ long &rHeight, long &rVerOffset)
// calculate height and vertical offset of root sign suitable for 'rRect'
{
rVerOffset = (rRect.GetBottom() - rRect.GetAlignB()) / 2;
@@ -947,7 +947,7 @@ void SmRootNode::GetHeightVerOffset(const SmRect &rRect,
Point SmRootNode::GetExtraPos(const SmRect &rRootSymbol,
- const SmRect &rExtra) const
+ const SmRect &rExtra)
{
const Size &rSymSize = rRootSymbol.GetSize();
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 5881c378c6f0..f8bdc5f13cc2 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -2324,14 +2324,12 @@ void SmParser::Special()
{
if (IsImportSymbolNames())
{
- const SmLocalizedSymbolData &rLSD = SM_MOD()->GetLocSymbolData();
- aNewName = rLSD.GetUiSymbolName(rName.copy(1));
+ aNewName = SmLocalizedSymbolData::GetUiSymbolName(rName.copy(1));
bReplace = true;
}
else if (IsExportSymbolNames())
{
- const SmLocalizedSymbolData &rLSD = SM_MOD()->GetLocSymbolData();
- aNewName = rLSD.GetExportSymbolName(rName.copy(1));
+ aNewName = SmLocalizedSymbolData::GetExportSymbolName(rName.copy(1));
bReplace = true;
}
}
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index ab09940a38ae..a3c9dd478c0d 100644
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -72,7 +72,7 @@ SmLocalizedSymbolData::~SmLocalizedSymbolData()
}
-const OUString SmLocalizedSymbolData::GetUiSymbolName( const OUString &rExportName ) const
+const OUString SmLocalizedSymbolData::GetUiSymbolName( const OUString &rExportName )
{
OUString aRes;
@@ -93,7 +93,7 @@ const OUString SmLocalizedSymbolData::GetUiSymbolName( const OUString &rExportNa
}
-const OUString SmLocalizedSymbolData::GetExportSymbolName( const OUString &rUiName ) const
+const OUString SmLocalizedSymbolData::GetExportSymbolName( const OUString &rUiName )
{
OUString aRes;
@@ -114,7 +114,7 @@ const OUString SmLocalizedSymbolData::GetExportSymbolName( const OUString &rUiNa
}
-const OUString SmLocalizedSymbolData::GetUiSymbolSetName( const OUString &rExportName ) const
+const OUString SmLocalizedSymbolData::GetUiSymbolSetName( const OUString &rExportName )
{
OUString aRes;
@@ -135,7 +135,7 @@ const OUString SmLocalizedSymbolData::GetUiSymbolSetName( const OUString &rExpor
}
-const OUString SmLocalizedSymbolData::GetExportSymbolSetName( const OUString &rUiName ) const
+const OUString SmLocalizedSymbolData::GetExportSymbolSetName( const OUString &rUiName )
{
OUString aRes;
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index d07bf42b6816..899380b7bd8a 100644
--- a/starmath/source/symbol.cxx
+++ b/starmath/source/symbol.cxx
@@ -258,8 +258,7 @@ void SmSymbolManager::Load()
}
// now add a %i... symbol to the 'iGreek' set for every symbol found in the 'Greek' set.
- SmLocalizedSymbolData aLocalizedData;
- const OUString aGreekSymbolSetName(aLocalizedData.GetUiSymbolSetName(OUString("Greek")));
+ const OUString aGreekSymbolSetName(SmLocalizedSymbolData::GetUiSymbolSetName(OUString("Greek")));
const SymbolPtrVec_t aGreekSymbols( GetSymbolSet( aGreekSymbolSetName ) );
OUString aSymbolSetName('i');
aSymbolSetName += aGreekSymbolSetName;
@@ -287,9 +286,8 @@ void SmSymbolManager::Save()
SmMathConfig &rCfg = *SM_MOD()->GetConfig();
// prepare to skip symbols from iGreek on saving
- SmLocalizedSymbolData aLocalizedData;
OUString aSymbolSetName('i');
- aSymbolSetName += aLocalizedData.GetUiSymbolSetName(OUString("Greek"));
+ aSymbolSetName += SmLocalizedSymbolData::GetUiSymbolSetName(OUString("Greek"));
SymbolPtrVec_t aTmp( GetSymbols() );
std::vector< SmSym > aSymbols;
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 74edb409a8a5..dbebc9b92786 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -636,7 +636,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
SID_SAVE_ONLY_USED_SYMBOLS, SID_SAVE_ONLY_USED_SYMBOLS,
0
};
- SfxItemSet *pItemSet = new SfxItemSet( pDocSh->GetPool(), nRange );
+ SfxItemSet *pItemSet = new SfxItemSet( SmDocShell::GetPool(), nRange );
SmModule *pp = SM_MOD();
pp->GetConfig()->ConfigToItemSet(*pItemSet);
VclPtr<SfxPrinter> pPrinter = SfxPrinter::Create ( aStream, pItemSet );
diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx
index 47fad4ebb097..0e54d8e7f606 100644
--- a/starmath/source/utility.cxx
+++ b/starmath/source/utility.cxx
@@ -75,7 +75,7 @@ vcl::Font SmFontPickList::Get(sal_uInt16 nPos) const
return nPos < aFontVec.size() ? aFontVec[nPos] : vcl::Font();
}
-bool SmFontPickList::CompareItem(const vcl::Font & rFirstFont, const vcl::Font & rSecondFont) const
+bool SmFontPickList::CompareItem(const vcl::Font & rFirstFont, const vcl::Font & rSecondFont)
{
return rFirstFont.GetName() == rSecondFont.GetName() &&
rFirstFont.GetFamily() == rSecondFont.GetFamily() &&
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index a9ae7e1fa116..cb391ebe2103 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1738,7 +1738,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
const SfxItemSet *pSet = rReq.GetArgs();
if ( !pSet )
{
- SfxItemSet aSet( GetDoc()->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
+ SfxItemSet aSet( SmDocShell::GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
aSet.Put( SvxZoomItem( SvxZoomType::PERCENT, aGraphic->GetZoom()));
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)