From 8df9165309715707cc038d04d859833370988444 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Tue, 7 Jun 2011 17:01:30 +0200 Subject: fdo#37869 re-add missing elements to Elements dialog in Math Signed-off-by: Jan Holesovsky --- starmath/source/toolbox.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'starmath') diff --git a/starmath/source/toolbox.cxx b/starmath/source/toolbox.cxx index e398e6313114..68e15f6079d0 100644 --- a/starmath/source/toolbox.cxx +++ b/starmath/source/toolbox.cxx @@ -238,7 +238,7 @@ void SmToolBoxWindow::StateChanged( StateChangedType nStateChange ) void SmToolBoxWindow::AdjustPosSize( bool bSetPos ) { Size aCatSize( aToolBoxCat.CalcWindowSizePixel( 2 ) ); - Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( 4 /* see nLines in SetCategory*/ ) ); + Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( 5 /* see nLines in SetCategory*/ ) ); OSL_ENSURE( aCatSize.Width() == aCmdSize.Width(), "width mismatch" ); // catalog settings @@ -307,13 +307,13 @@ void SmToolBoxWindow::SetCategory(sal_uInt16 nCategoryRID) switch (nCategoryRID) { case RID_UNBINOPS_CAT : nLines = 4; break; - case RID_RELATIONS_CAT: nLines = 4; break; - case RID_SETOPERATIONS_CAT: nLines = 4; break; - case RID_FUNCTIONS_CAT: nLines = 4; break; + case RID_RELATIONS_CAT: nLines = 5; break; + case RID_SETOPERATIONS_CAT: nLines = 5; break; + case RID_FUNCTIONS_CAT: nLines = 5; break; case RID_OPERATORS_CAT: nLines = 3; break; - case RID_ATTRIBUTES_CAT: nLines = 4; break; + case RID_ATTRIBUTES_CAT: nLines = 5; break; case RID_MISC_CAT: nLines = 4; break; - case RID_BRACKETS_CAT: nLines = 4; break; + case RID_BRACKETS_CAT: nLines = 5; break; case RID_FORMAT_CAT: nLines = 3; break; default: // nothing to be done -- cgit From 64be4292eb919396c2f06544b9bbaa5568dddb2a Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Fri, 17 Jun 2011 22:30:17 +0200 Subject: Function can be const --- starmath/source/visitors.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'starmath') diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx index 5e8a574eab7b..f342b3dbb73a 100644 --- a/starmath/source/visitors.cxx +++ b/starmath/source/visitors.cxx @@ -486,7 +486,7 @@ public: void SetFillColor( const Color& rColor ) { rOutDev.SetFillColor( Impl_GetColor( rColor ) ); } void SetTextColor( const Color& rColor ) { rOutDev.SetTextColor( Impl_GetColor( rColor ) ); } - operator OutputDevice & ( ) { return rOutDev; } + operator OutputDevice & ( ) const { return rOutDev; } }; SmTmpDevice2::SmTmpDevice2( OutputDevice &rTheDev, bool bUseMap100th_mm ) : -- cgit From b795ca330fe8d8927bc24f16df7f80612884c492 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Mon, 30 May 2011 18:48:02 +0200 Subject: remove all traces of offuh from makefiles --- starmath/CppunitTest_starmath_qa_cppunit.mk | 6 +++++- starmath/Library_sm.mk | 6 +++++- starmath/Library_smd.mk | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'starmath') diff --git a/starmath/CppunitTest_starmath_qa_cppunit.mk b/starmath/CppunitTest_starmath_qa_cppunit.mk index 0f4606a2064e..5d22f83a668c 100644 --- a/starmath/CppunitTest_starmath_qa_cppunit.mk +++ b/starmath/CppunitTest_starmath_qa_cppunit.mk @@ -32,7 +32,11 @@ $(eval $(call gb_CppunitTest_set_include,starmath_qa_cppunit,\ -I$(realpath $(SRCDIR)/starmath/inc) \ -I$(realpath $(SRCDIR)/starmath/inc/pch) \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_CppunitTest_add_api,starmath_qa_cppunit,\ + offapi \ + udkapi \ )) $(eval $(call gb_CppunitTest_set_defs,starmath_qa_cppunit,\ diff --git a/starmath/Library_sm.mk b/starmath/Library_sm.mk index bd492dfdc472..8bed8a508889 100644 --- a/starmath/Library_sm.mk +++ b/starmath/Library_sm.mk @@ -33,7 +33,6 @@ $(eval $(call gb_Library_set_include,sm,\ -I$(WORKDIR)/SdiTarget/starmath/sdi \ -I$(WORKDIR)/Misc/starmath/ \ $$(INCLUDE) \ - -I$(OUTDIR)/inc/offuh \ -I$(OUTDIR)/inc \ )) @@ -43,6 +42,11 @@ $(eval $(call gb_Library_set_defs,sm,\ -DSC_INFO_OSVERSION=\"$(OS)\" \ )) +$(eval $(call gb_Library_add_api,sm,\ + offapi \ + udkapi \ +)) + $(eval $(call gb_Library_add_linked_libs,sm,\ comphelper \ cppu \ diff --git a/starmath/Library_smd.mk b/starmath/Library_smd.mk index 538f92104d56..48894136604f 100644 --- a/starmath/Library_smd.mk +++ b/starmath/Library_smd.mk @@ -30,7 +30,6 @@ $(eval $(call gb_Library_set_include,smd,\ -I$(realpath $(SRCDIR)/starmath/inc) \ -I$(WORKDIR)/Misc/sm/ \ $$(INCLUDE) \ - -I$(OUTDIR)/inc/offuh \ -I$(OUTDIR)/inc \ )) @@ -38,6 +37,11 @@ $(eval $(call gb_Library_set_defs,smd,\ $$(DEFS) \ )) +$(eval $(call gb_Library_add_api,smd,\ + offapi \ + udkapi \ +)) + $(eval $(call gb_Library_add_linked_libs,smd,\ cppu \ cppuhelper \ -- cgit From 69c0b92475e0a51af598d4f9dc69619f0ea014b3 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 20 Jun 2011 00:10:26 +0100 Subject: ByteString -> rtl::OStringBuffer --- starmath/source/node.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'starmath') diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index 1df2de00ec53..93dbedf73ea5 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -564,7 +564,7 @@ void SmNode::DumpAsDot(std::ostream &out, String* label, int number, int& id, in eq.SearchAndReplaceAll(String::CreateFromAscii("\\"), String::CreateFromAscii("\\\\")); eq.SearchAndReplaceAll(String::CreateFromAscii("\""), String::CreateFromAscii("\\\"")); out<<"label= \"Equation: \\\""; - out<GetText(), RTL_TEXTENCODING_UTF8).GetBuffer(); + out<< rtl::OUStringToOString(((SmTextNode*)this)->GetText(), RTL_TEXTENCODING_UTF8).getStr(); break; case NSPECIAL: out<<"SmSpecialNode"; break; case NGLYPH_SPECIAL: out<<"SmGlyphSpecialNode"; break; case NMATH: out<<"SmMathSymbolNode: "; - out<< ByteString( ((SmMathSymbolNode*)this)->GetText(), RTL_TEXTENCODING_UTF8).GetBuffer(); + out<< rtl::OUStringToOString(((SmMathSymbolNode*)this)->GetText(), RTL_TEXTENCODING_UTF8).getStr(); break; case NBLANK: out<<"SmBlankNode"; break; case NERROR: out<<"SmErrorNode"; break; -- cgit From f3d9e12d087a4e907d6f505dfe27c10b765ea120 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 28 Jun 2011 16:41:42 +0100 Subject: fix nutty pseudo-deference of NULL --- starmath/inc/document.hxx | 4 +--- starmath/source/document.cxx | 6 ++---- starmath/source/edit.cxx | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) (limited to 'starmath') diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx index 97753d9446e1..562763e12fc8 100644 --- a/starmath/inc/document.hxx +++ b/starmath/inc/document.hxx @@ -100,9 +100,7 @@ public: //////////////////////////////////////////////////////////// -void SetEditEngineDefaultFonts( - EditEngine &rEditEngine, - SfxItemPool &rEditEngineItemPool ); +void SetEditEngineDefaultFonts(SfxItemPool &rEditEngineItemPool); //////////////////////////////////////////////////////////// diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 337e038df69e..b0ec43e32615 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -325,9 +325,7 @@ void SmDocShell::ArrangeFormula() } -void SetEditEngineDefaultFonts( - EditEngine &/*rEditEngine*/, - SfxItemPool &rEditEngineItemPool ) +void SetEditEngineDefaultFonts(SfxItemPool &rEditEngineItemPool) { // // set fonts to be used @@ -394,7 +392,7 @@ EditEngine& SmDocShell::GetEditEngine() pEditEngineItemPool = EditEngine::CreatePool(); - SetEditEngineDefaultFonts( *pEditEngine, *pEditEngineItemPool ); + SetEditEngineDefaultFonts(*pEditEngineItemPool); pEditEngine = new EditEngine( pEditEngineItemPool ); diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index bfc0309ebe71..0779c823052c 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -250,7 +250,7 @@ void SmEditWindow::DataChanged( const DataChangedEvent& ) pEditEngine->SetDefTab( sal_uInt16( GetTextWidth( C2S("XXXX") ) ) ); - SetEditEngineDefaultFonts( *pEditEngine, *pEditEngineItemPool ); + SetEditEngineDefaultFonts(*pEditEngineItemPool); // forces new settings to be used // unfortunately this resets the whole edit engine -- cgit From 0c6758ac0af2e5a64605e2bddc055d93997aeb03 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 30 Jun 2011 16:17:52 +0100 Subject: add modified unoexceptionprotector for better error msgs from exceptions --- starmath/CppunitTest_starmath_qa_cppunit.mk | 1 + starmath/prj/build.lst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'starmath') diff --git a/starmath/CppunitTest_starmath_qa_cppunit.mk b/starmath/CppunitTest_starmath_qa_cppunit.mk index 5d22f83a668c..bfd17e4ff92e 100644 --- a/starmath/CppunitTest_starmath_qa_cppunit.mk +++ b/starmath/CppunitTest_starmath_qa_cppunit.mk @@ -90,6 +90,7 @@ $(eval $(call gb_CppunitTest_add_service_rdbs,starmath_qa_cppunit,\ $(eval $(call gb_CppunitTest_set_args,starmath_qa_cppunit,\ --headless \ --invisible \ + --protector unoexceptionprotector$(gb_Library_PLAINEXT) unoexceptionprotector \ )) $(eval $(call gb_RdbTarget_RdbTarget,starmath_qa_cppunit)) diff --git a/starmath/prj/build.lst b/starmath/prj/build.lst index 6b60a031bd13..924ca7fd9e81 100644 --- a/starmath/prj/build.lst +++ b/starmath/prj/build.lst @@ -1,2 +1,2 @@ -sm starmath : LIBXSLT:libxslt TRANSLATIONS:translations svx configmgr dtrans ure NULL +sm starmath : LIBXSLT:libxslt TRANSLATIONS:translations svx configmgr dtrans ure test NULL sm starmath\prj nmake - all sm_prj NULL -- cgit From 405454c88a44f0f881d67b4c707a5714cfc1d53c Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 1 Jul 2011 14:47:56 +0100 Subject: gb_Library_PLAINEXT->gb_Library_DLLEXT --- starmath/CppunitTest_starmath_qa_cppunit.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'starmath') diff --git a/starmath/CppunitTest_starmath_qa_cppunit.mk b/starmath/CppunitTest_starmath_qa_cppunit.mk index bfd17e4ff92e..1713710c9762 100644 --- a/starmath/CppunitTest_starmath_qa_cppunit.mk +++ b/starmath/CppunitTest_starmath_qa_cppunit.mk @@ -90,7 +90,7 @@ $(eval $(call gb_CppunitTest_add_service_rdbs,starmath_qa_cppunit,\ $(eval $(call gb_CppunitTest_set_args,starmath_qa_cppunit,\ --headless \ --invisible \ - --protector unoexceptionprotector$(gb_Library_PLAINEXT) unoexceptionprotector \ + --protector unoexceptionprotector$(gb_Library_DLLEXT) unoexceptionprotector \ )) $(eval $(call gb_RdbTarget_RdbTarget,starmath_qa_cppunit)) -- cgit From 9a28ab67c1a274f016f88cdd94283fd5325ad30d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 4 Jul 2011 01:26:18 +0100 Subject: valgrind: init nTypeFace --- starmath/source/mathtype.hxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'starmath') diff --git a/starmath/source/mathtype.hxx b/starmath/source/mathtype.hxx index cfacad560290..e37d388f8e8a 100644 --- a/starmath/source/mathtype.hxx +++ b/starmath/source/mathtype.hxx @@ -64,14 +64,16 @@ class MathType public: MathType(String &rIn) : rRet(rIn), nHAlign(0), nVAlign(0), nDefaultSize(12), - nLSize(0), nDSize(0), nCurSize(0), nLastSize(0), bIsSilent(sal_False) + nLSize(0), nDSize(0), nCurSize(0), nLastSize(0), bIsSilent(sal_False), + nTypeFace(0) { Init(); } MathType(String &rIn,SmNode *pIn) : rRet(rIn), pTree(pIn), nHAlign(2), nVAlign(0), nInsertion(0), nDefaultSize(12), - nLSize(0), nDSize(0), nCurSize(0), nLastSize(0), nSpec(0), bIsSilent(sal_False) + nLSize(0), nDSize(0), nCurSize(0), nLastSize(0), nSpec(0), bIsSilent(sal_False), + nTypeFace(0) { Init(); } -- cgit From cfafbc5f34673a028b686b10d79e1758c607d440 Mon Sep 17 00:00:00 2001 From: Matus Kukan Date: Sun, 3 Jul 2011 15:24:15 +0200 Subject: Remove component_getImplementationEnvironment --- starmath/source/detreg.cxx | 7 ------- starmath/source/register.cxx | 7 ------- 2 files changed, 14 deletions(-) (limited to 'starmath') diff --git a/starmath/source/detreg.cxx b/starmath/source/detreg.cxx index 45f539b0931d..366b64d8abbe 100644 --- a/starmath/source/detreg.cxx +++ b/starmath/source/detreg.cxx @@ -42,13 +42,6 @@ using namespace ::com::sun::star::lang; extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char** ppEnvironmentTypeName, - uno_Environment** /*ppEnvironment*/ ) -{ - *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; -} - SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, void* /*pRegistryKey*/ ) diff --git a/starmath/source/register.cxx b/starmath/source/register.cxx index 0851ef040fbe..815e05185f45 100644 --- a/starmath/source/register.cxx +++ b/starmath/source/register.cxx @@ -112,13 +112,6 @@ extern Reference< XInterface > SAL_CALL extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char** ppEnvironmentTypeName, - uno_Environment** /*ppEnvironment*/ ) -{ - *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; -} - SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, void* /*pRegistryKey*/ ) -- cgit From be39d17a2ba8e0eb9e67f4e1e31afab623bb5c55 Mon Sep 17 00:00:00 2001 From: Matúš Kukan Date: Fri, 15 Jul 2011 16:40:20 +0200 Subject: Add prefixes for component_getFactory methods --- starmath/source/detreg.cxx | 2 +- starmath/source/register.cxx | 2 +- starmath/util/sm.component | 2 +- starmath/util/smd.component | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'starmath') diff --git a/starmath/source/detreg.cxx b/starmath/source/detreg.cxx index 366b64d8abbe..be0fe1135d49 100644 --- a/starmath/source/detreg.cxx +++ b/starmath/source/detreg.cxx @@ -42,7 +42,7 @@ using namespace ::com::sun::star::lang; extern "C" { -SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, +SAL_DLLPUBLIC_EXPORT void* SAL_CALL smd_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, void* /*pRegistryKey*/ ) { diff --git a/starmath/source/register.cxx b/starmath/source/register.cxx index 815e05185f45..ef921342ba07 100644 --- a/starmath/source/register.cxx +++ b/starmath/source/register.cxx @@ -112,7 +112,7 @@ extern Reference< XInterface > SAL_CALL extern "C" { -SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, +SAL_DLLPUBLIC_EXPORT void* SAL_CALL sm_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, void* /*pRegistryKey*/ ) { diff --git a/starmath/util/sm.component b/starmath/util/sm.component index 8047662e2915..407f0676a12b 100644 --- a/starmath/util/sm.component +++ b/starmath/util/sm.component @@ -26,7 +26,7 @@ * **********************************************************************--> - diff --git a/starmath/util/smd.component b/starmath/util/smd.component index 9f566864482e..70adf5a12753 100644 --- a/starmath/util/smd.component +++ b/starmath/util/smd.component @@ -26,7 +26,7 @@ * **********************************************************************--> - -- cgit From cc0c8a38e217cc047ae62872f9e81600646251df Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 14 Jul 2011 16:44:32 +0200 Subject: starmath: check for existing edit window --- starmath/source/view.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'starmath') diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index b8e91f8981ed..3d4ed2fd5f81 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -195,6 +195,8 @@ void SmGraphicWindow::MouseButtonDown(const MouseEvent& rMEvt) if (pNode) { SmEditWindow *pEdit = pViewShell->GetEditWindow(); + if (!pEdit) + return; const SmToken aToken (pNode->GetToken()); // set selection to the beginning of the token -- cgit From 704581652cacc2d86f2b369a866b24dab2e7e292 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 15 Jul 2011 18:11:43 +0200 Subject: starmath: check for edit window when inline editing is enabled --- starmath/source/view.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'starmath') diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 3d4ed2fd5f81..ffd5413eced8 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -224,7 +224,8 @@ void SmGraphicWindow::GetFocus() { if (!IsInlineEditEnabled()) return; - pViewShell->GetEditWindow()->Flush(); + if (pViewShell->GetEditWindow()) + pViewShell->GetEditWindow()->Flush(); //Let view shell know what insertions should be done in visual editor pViewShell->SetInsertIntoEditWindow(false); SetIsCursorVisible(true); -- cgit