summaryrefslogtreecommitdiffstats
path: root/starmath/source
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/source
parentAdd missing-files to starmath libraries (diff)
parentcheck reads and seeks (diff)
downloadcore-834e0a54701f7511159b84cd1dc1203f8f8846b4.tar.gz
core-834e0a54701f7511159b84cd1dc1203f8f8846b4.zip
resyncing to master
Diffstat (limited to 'starmath/source')
-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
9 files changed, 23 insertions, 20 deletions
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 ) :