summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2016-05-27 12:11:36 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2016-05-28 00:06:52 +0000
commit3afac0812b6b946f175c40bee41aa0ff4e3f9c83 (patch)
tree8bf1fa19ed052bd5589bc118d2467de97c78250a /starmath
parent9d2f7be4e65595241db3cf5135b69bd9e4ce6a30 (diff)
starmath: Make some functions of SmDocShell public
so that SmModel is no longer required to be a friend of SmDocShell. Change-Id: I7153a9ef13ae829710acf580ff0a9c30705aeb25 Reviewed-on: https://gerrit.libreoffice.org/25528 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/document.hxx15
-rw-r--r--starmath/source/unomodel.cxx6
2 files changed, 10 insertions, 11 deletions
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index 4b8d35ff280c..e52fa192c133 100644
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -85,7 +85,6 @@ void SetEditEngineDefaultFonts(SfxItemPool &rEditEngineItemPool);
class SM_DLLPUBLIC SmDocShell : public SfxObjectShell, public SfxListener
{
friend class SmPrinterAccess;
- friend class SmModel;
friend class SmCursor;
OUString aText;
@@ -131,7 +130,6 @@ class SM_DLLPUBLIC SmDocShell : public SfxObjectShell, public SfxListener
Printer *GetPrt();
OutputDevice* GetRefDev();
- bool IsFormulaArranged() const { return bIsFormulaArranged; }
void SetFormulaArranged(bool bVal) { bIsFormulaArranged = bVal; }
virtual bool ConvertFrom(SfxMedium &rMedium) override;
@@ -141,12 +139,6 @@ class SM_DLLPUBLIC SmDocShell : public SfxObjectShell, public SfxListener
*/
void InvalidateCursor();
- bool writeFormulaOoxml(const ::sax_fastparser::FSHelperPtr& pSerializer,
- oox::core::OoxmlVersion version,
- oox::drawingml::DocumentType documentType);
- void writeFormulaRtf(OStringBuffer& rBuffer, rtl_TextEncoding nEncoding);
- void readFormulaOoxml( oox::formulaimport::XmlStream& stream );
-
public:
SFX_DECL_INTERFACE(SFX_INTERFACE_SMA_START+1)
@@ -164,6 +156,7 @@ public:
static void SaveSymbols();
void ArrangeFormula();
+ bool IsFormulaArranged() const { return bIsFormulaArranged; }
//Access for the View. This access is not for the OLE-case!
//and for the communication with the SFX!
@@ -218,6 +211,12 @@ public:
* has some sort of position.
*/
bool HasCursor();
+
+ bool writeFormulaOoxml(const ::sax_fastparser::FSHelperPtr& pSerializer,
+ oox::core::OoxmlVersion version,
+ oox::drawingml::DocumentType documentType);
+ void writeFormulaRtf(OStringBuffer& rBuffer, rtl_TextEncoding nEncoding);
+ void readFormulaOoxml( oox::formulaimport::XmlStream& stream );
};
#endif
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 6343bba66663..8a57d01e4e0c 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -892,14 +892,14 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
// #i972#
case HANDLE_BASELINE:
{
- if ( !pDocSh->pTree )
+ if ( !pDocSh->GetFormulaTree() )
pDocSh->Parse();
- if ( pDocSh->pTree )
+ if ( pDocSh->GetFormulaTree() )
{
if ( !pDocSh->IsFormulaArranged() )
pDocSh->ArrangeFormula();
- *pValue <<= static_cast<sal_Int32>( pDocSh->pTree->GetFormulaBaseline() );
+ *pValue <<= static_cast<sal_Int32>( pDocSh->GetFormulaTree()->GetFormulaBaseline() );
}
break;
}