starmath/inc/document.hxx | 15 +++++++-------- starmath/source/unomodel.cxx | 6 +++--- 2 files changed, 10 insertions(+), 11 deletions(-)
New commits: commit 3afac0812b6b946f175c40bee41aa0ff4e3f9c83 Author: Takeshi Abe <t...@fixedpoint.jp> Date: Fri May 27 12:11:36 2016 +0900 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 <c...@libreoffice.org> Reviewed-by: Takeshi Abe <t...@fixedpoint.jp> diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx index 4b8d35f..e52fa19 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 6343bba..8a57d01 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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits