Commit 5e115a77 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

libkformula links now

use kcommandhistory and not kocommandhistory as it's not use now.
Need to port kformula::kaction



svn path=/trunk/koffice/; revision=530940
parent 390f6fa8
......@@ -49,7 +49,7 @@ kde4_automoc(${kformulalib_LIB_SRCS})
kde4_add_library(kformulalib SHARED ${kformulalib_LIB_SRCS})
target_link_libraries(kformulalib ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} )
target_link_libraries(kformulalib ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} kotext kofficeui)
set_target_properties(kformulalib PROPERTIES VERSION 4.0.0 SOVERSION 4 )
install_targets(${LIB_INSTALL_DIR} kformulalib )
......
......@@ -147,7 +147,7 @@ FormulaCursor* Container::createCursor()
}
KoCommandHistory* Container::getHistory() const
KCommandHistory* Container::getHistory() const
{
return document()->getHistory();
}
......
......@@ -33,7 +33,6 @@
#include <kcommand.h>
//#include <KoCommandHistory.h>
#include "KoCommandHistory.h"
#include "kformuladefs.h"
class QColorGroup;
......@@ -389,7 +388,7 @@ public:
protected:
KoCommandHistory* getHistory() const;
KCommandHistory* getHistory() const;
/**
* @returns the root of our element tree. That's the formula's structure.
......
......@@ -306,7 +306,7 @@ void Document::setEnabled( bool enabled )
}
KoCommandHistory* Document::getHistory() const
KCommandHistory* Document::getHistory() const
{
return m_wrapper->getHistory();
}
......@@ -341,7 +341,7 @@ void Document::introduceWrapper( DocumentWrapper* wrapper, bool init )
DocumentWrapper::DocumentWrapper( KConfig* config,
KActionCollection* collection,
KoCommandHistory* history )
KCommandHistory* history )
: m_document( 0 ),
m_leftBracketChar( LeftRoundBracket ),
m_rightBracketChar( RightRoundBracket ),
......@@ -392,10 +392,10 @@ void DocumentWrapper::document( Document* document, bool init )
}
void DocumentWrapper::setCommandStack( KoCommandHistory* history )
void DocumentWrapper::setCommandStack( KCommandHistory* history )
{
if ( history == 0 ) {
m_history = new KoCommandHistory;
m_history = new KCommandHistory;
m_ownHistory = true;
}
else {
......
......@@ -30,7 +30,7 @@
#include <kaction.h>
#include <kcommand.h>
#include <kconfig.h>
#include <KoCommandHistory.h>
#include <kcommand.h>
//#include "KoCommandHistory.h"
#include "kformuladefs.h"
......@@ -167,7 +167,7 @@ public:
/**
* @returns our undo stack so the formulas can use it.
*/
KoCommandHistory* getHistory() const;
KCommandHistory* getHistory() const;
/**
* @returns the documents symbol table
......@@ -275,11 +275,11 @@ public:
DocumentWrapper( KConfig* config,
KActionCollection* collection,
KoCommandHistory* history = 0 );
KCommandHistory* history = 0 );
~DocumentWrapper();
KConfig* config() { return m_config; }
KoCommandHistory* history() { return m_history; }
KCommandHistory* history() { return m_history; }
/**
* @return the document we are using.
......@@ -349,7 +349,7 @@ public:
void updateConfig();
KoCommandHistory* getHistory() const { return m_history; }
KCommandHistory* getHistory() const { return m_history; }
void undo();
void redo();
......@@ -413,7 +413,7 @@ private:
void createActions( KActionCollection* collection );
void initSymbolNamesAction();
void setCommandStack( KoCommandHistory* history );
void setCommandStack( KCommandHistory* history );
bool hasFormula() { return m_document->hasFormula(); }
Container* formula() { return m_document->m_formula; }
......@@ -471,7 +471,7 @@ private:
QString m_selectedName;
KConfig* m_config;
KoCommandHistory* m_history;
KCommandHistory* m_history;
/**
* Tells whether we are responsible to remove our history.
......
......@@ -114,7 +114,7 @@ SymbolAction::SymbolAction( KActionCollection* parent, const char* name )
SymbolAction::SymbolAction( const QString& text, const KShortcut& cut,
const QObject* receiver, const char* slot,
QObject* parent, const char* name )
KActionCollection* parent, const char* name )
: KSelectAction( text, cut, receiver, slot, parent, name )
{
setEditable( FALSE );
......@@ -126,7 +126,9 @@ int SymbolAction::plug( QWidget* w, int index )
return -1;
if ( w->inherits( "KToolBar" ) )
{
KToolBar* bar = static_cast<KToolBar*>( w );
#warning "kde4: port it"
#if 0
KToolBar* bar = static_cast<KToolBar*>( w );
int id_ = KAction::getToolButtonID();
KComboBox *cb = new KComboBox( bar );
connect( cb, SIGNAL( activated( const QString & ) ),
......@@ -142,8 +144,10 @@ int SymbolAction::plug( QWidget* w, int index )
updateItems( containerCount() - 1 );
return containerCount() - 1;
#endif
return 0;
}
else return KSelectAction::plug( w, index );
else return KSelectAction::plug( w, index );
}
void SymbolAction::setSymbols( const QStringList &names, const Q3ValueList<QFont>& fonts,
......@@ -162,6 +166,8 @@ void SymbolAction::updateItems( int id )
{
QWidget *w = container( id );
if ( w->inherits( "KToolBar" ) ) {
#warning "kde4: port it"
#if 0
QWidget *r = static_cast<KToolBar*>( w )->getWidget( itemId( id ) );
if ( r->inherits( "Q3ComboBox" ) ) {
Q3ComboBox *cb = static_cast<Q3ComboBox*>( r );
......@@ -173,6 +179,7 @@ void SymbolAction::updateItems( int id )
}
cb->setMinimumWidth( cb->sizeHint().width() );
}
#endif
}
}
......
......@@ -34,7 +34,7 @@ class SymbolAction : public KSelectAction
public:
SymbolAction( KActionCollection* parent = 0, const char* name = 0 );
SymbolAction( const QString& text, const KShortcut& cut,
const QObject* receiver, const char* slot, QObject* parent,
const QObject* receiver, const char* slot, KActionCollection* parent,
const char* name = 0 );
int plug( QWidget*, int index = -1 );
......
......@@ -55,7 +55,7 @@ install_targets(${LIB_INSTALL_DIR} kofficeui )
########### install files ###############
install_files( /include FILES KoPageLayoutDia.h KoZoomAction.h KoTabBar.h KoPartSelectDia.h KoPartSelectAction.h KoRuler.h KoTemplateChooseDia.h KoTabChooser.h KoKoolBar.h KoTemplateCreateDia.h KoContextHelp.h KoPictureFilePreview.h KoUnitWidgets.h tkaction.h tkcoloractions.h tktoolbarbutton.h tkcombobox.h KoCharSelectDia.h KoInsertLink.h KoEditPath.h KoCommandHistory.h KoImageResource.h KoZoomHandler.h KoGuideLineDia.h KoGuides.h KoPageLayoutHeader.h KoPageLayoutSize.h KoGeneralPropertyUi.h KoPageLayoutColumns.h KoBrush.h KoPen.h KoZoomMode.h )
install_files( /include FILES KoPageLayoutDia.h KoZoomAction.h KoTabBar.h KoPartSelectDia.h KoPartSelectAction.h KoRuler.h KoTemplateChooseDia.h KoTabChooser.h KoKoolBar.h KoTemplateCreateDia.h KoContextHelp.h KoPictureFilePreview.h KoUnitWidgets.h tkaction.h tkcoloractions.h tktoolbarbutton.h tkcombobox.h KoCharSelectDia.h KoInsertLink.h KoEditPath.h KoImageResource.h KoZoomHandler.h KoGuideLineDia.h KoGuides.h KoPageLayoutHeader.h KoPageLayoutSize.h KoGeneralPropertyUi.h KoPageLayoutColumns.h KoBrush.h KoPen.h KoZoomMode.h )
kde4_footer()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment