summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-07-21 19:01:55 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-07-21 19:01:55 +0200
commit834e0a54701f7511159b84cd1dc1203f8f8846b4 (patch)
treec577104ff9e1f6477439c13037aa7bb508e225e3 /starmath
parent78b298eba8bb9d99361bac845fa1b042db2d06a6 (diff)
parent9298050e22cddecf42d5b541d92f5ded5ec7ba3c (diff)
resyncing to master
Diffstat (limited to 'starmath')
-rw-r--r--starmath/CppunitTest_starmath_qa_cppunit.mk7
-rw-r--r--starmath/Library_sm.mk6
-rw-r--r--starmath/Library_smd.mk6
-rw-r--r--starmath/inc/document.hxx4
-rw-r--r--starmath/prj/build.lst2
-rw-r--r--starmath/source/detreg.cxx2
-rw-r--r--starmath/source/document.cxx6
-rw-r--r--starmath/source/edit.cxx2
-rw-r--r--starmath/source/mathtype.hxx6
-rw-r--r--starmath/source/node.cxx6
-rw-r--r--starmath/source/register.cxx2
-rw-r--r--starmath/source/toolbox.cxx12
-rw-r--r--starmath/source/view.cxx5
-rw-r--r--starmath/source/visitors.cxx2
-rw-r--r--starmath/util/sm.component2
-rw-r--r--starmath/util/smd.component2
16 files changed, 43 insertions, 29 deletions
diff --git a/starmath/CppunitTest_starmath_qa_cppunit.mk b/starmath/CppunitTest_starmath_qa_cppunit.mk
index 0f4606a2064e..1713710c9762 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,\
@@ -86,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_DLLEXT) unoexceptionprotector \
))
$(eval $(call gb_RdbTarget_RdbTarget,starmath_qa_cppunit))
diff --git a/starmath/Library_sm.mk b/starmath/Library_sm.mk
index 7e5162fe6637..6d9e05efd51a 100644
--- a/starmath/Library_sm.mk
+++ b/starmath/Library_sm.mk
@@ -32,10 +32,14 @@ $(eval $(call gb_Library_set_include,sm,\
-I$(realpath $(SRCDIR)/starmath/inc) \
-I$(WORKDIR)/SdiTarget/starmath/sdi \
$$(INCLUDE) \
- -I$(OUTDIR)/inc/offuh \
-I$(OUTDIR)/inc \
))
+))
+
+$(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 5653614c956b..995cd77c1df9 100644
--- a/starmath/Library_smd.mk
+++ b/starmath/Library_smd.mk
@@ -35,7 +35,11 @@ $(eval $(call gb_Library_set_include,smd,\
$$(INCLUDE) \
-I$(SRCDIR)/starmath/inc \
-I$(SRCDIR)/starmath/inc/pch \
- -I$(OUTDIR)/inc/offuh \
+))
+
+$(eval $(call gb_Library_add_api,smd,\
+ offapi \
+ udkapi \
))
$(eval $(call gb_Library_add_linked_libs,smd,\
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/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
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/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
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();
}
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<<ByteString( eq, RTL_TEXTENCODING_UTF8).GetBuffer();
+ out<< rtl::OUStringToOString(eq, RTL_TEXTENCODING_UTF8).getStr();
out<<"\\\"\";"<<std::endl;
}
}
@@ -605,13 +605,13 @@ void SmNode::DumpAsDot(std::ostream &out, String* label, int number, int& id, in
case NPLACE: out<<"SmPlaceNode"; break;
case NTEXT:
out<<"SmTextNode: ";
- out<< ByteString( ((SmTextNode*)this)->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;
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/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
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index b8e91f8981ed..ffd5413eced8 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
@@ -222,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);
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 ) :
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 @@
*
**********************************************************************-->
-<component loader="com.sun.star.loader.SharedLibrary"
+<component loader="com.sun.star.loader.SharedLibrary" prefix="sm"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.Math.FormulaDocument">
<service name="com.sun.star.formula.FormulaProperties"/>
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 @@
*
**********************************************************************-->
-<component loader="com.sun.star.loader.SharedLibrary"
+<component loader="com.sun.star.loader.SharedLibrary" prefix="smd"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.math.FormatDetector">
<service name="com.sun.star.frame.ExtendedTypeDetection"/>