From 69ea879c3dceb464f3d01ae3ecbd178bd77de96a Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 10 Dec 2009 18:09:38 +0100 Subject: #i107450#: remove SdrObject dependency from OutlinerForwarder; EditEnginePool for ItempropertySet of EditObjects; split unoprov.hxx+cxx --- forms/source/richtext/richtextunowrapper.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/forms/source/richtext/richtextunowrapper.cxx b/forms/source/richtext/richtextunowrapper.cxx index f5a9d178d32c..fa5733ef488c 100644 --- a/forms/source/richtext/richtextunowrapper.cxx +++ b/forms/source/richtext/richtextunowrapper.cxx @@ -38,6 +38,8 @@ #include #include #include +#include +#include //........................................................................ namespace frm @@ -64,7 +66,7 @@ namespace frm { MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType( static_cast< const Reference< XNameContainer >* >( NULL ) ), 0, 0 }, { NULL, 0, 0, NULL, 0, 0 } }; - static SvxItemPropertySet aTextEnginePropertySet( aTextEnginePropertyMap ); + static SvxItemPropertySet aTextEnginePropertySet( aTextEnginePropertyMap, SdrObject::GetGlobalDrawObjectItemPool() ); return &aTextEnginePropertySet; } } -- cgit v1.2.3 From cce4c0607de1a4b63728812500c20c4b099c8214 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 10 Dec 2009 18:36:58 +0100 Subject: #i107450#: move GetLanguageString to class SvtLanguageTable --- cui/source/dialogs/SpellDialog.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 0e69585a4ff4..a583a708c8b0 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -73,6 +73,7 @@ #include #include #include "treeopt.hxx" +#include using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -927,7 +928,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang) sTitle = m_sTitleSpellingGrammar; } } - sTitle.SearchAndReplaceAscii( "$LANGUAGE ($LOCATION)", ::GetLanguageString(nLang) ); + sTitle.SearchAndReplaceAscii( "$LANGUAGE ($LOCATION)", SvtLanguageTable::GetLanguageString(nLang) ); SetText( sTitle ); } /*------------------------------------------------------------------------- -- cgit v1.2.3 From 5a85f2a075030f9f15e5d48ed0a82dbf5eb55d68 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 10 Dec 2009 18:44:22 +0100 Subject: #i107450#: split up the two different ways to detect a module field unit --- cui/source/tabpages/border.cxx | 2 +- cui/source/tabpages/connect.cxx | 2 +- cui/source/tabpages/grfpage.cxx | 4 ++-- cui/source/tabpages/labdlg.cxx | 2 +- cui/source/tabpages/measure.cxx | 2 +- cui/source/tabpages/page.cxx | 2 +- cui/source/tabpages/paragrph.cxx | 2 +- cui/source/tabpages/swpossizetabpage.cxx | 2 +- cui/source/tabpages/tabstpge.cxx | 2 +- cui/source/tabpages/textanim.cxx | 2 +- cui/source/tabpages/textattr.cxx | 2 +- cui/source/tabpages/tparea.cxx | 2 +- cui/source/tabpages/tphatch.cxx | 2 +- cui/source/tabpages/tpline.cxx | 2 +- cui/source/tabpages/tplnedef.cxx | 2 +- cui/source/tabpages/tpshadow.cxx | 2 +- cui/source/tabpages/transfrm.cxx | 6 +++--- 17 files changed, 20 insertions(+), 20 deletions(-) diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 31191b4dffe1..955e297f6515 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -239,7 +239,7 @@ SvxBorderTabPage::SvxBorderTabPage( Window* pParent, mbUseMarginItem = rCoreAttrs.GetItemState(GetWhich(SID_ATTR_ALIGN_MARGIN),TRUE) != SFX_ITEM_UNKNOWN; // Metrik einstellen - FieldUnit eFUnit = GetModuleFieldUnit( &rCoreAttrs ); + FieldUnit eFUnit = GetModuleFieldUnit( rCoreAttrs ); if( mbUseMarginItem ) { diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx index cd62234aeb2d..9d354ce71da5 100644 --- a/cui/source/tabpages/connect.cxx +++ b/cui/source/tabpages/connect.cxx @@ -133,7 +133,7 @@ SvxConnectionPage::SvxConnectionPage( Window* pWindow, const SfxItemSet& rInAttr FillTypeLB(); - const FieldUnit eFUnit = GetModuleFieldUnit( &rInAttrs ); + const FieldUnit eFUnit = GetModuleFieldUnit( rInAttrs ); SetFieldUnit( aMtrFldHorz1, eFUnit ); SetFieldUnit( aMtrFldHorz2, eFUnit ); SetFieldUnit( aMtrFldVert1, eFUnit ); diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 5afb0e817aa3..d32b264c3715 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -93,7 +93,7 @@ SvxGrfCropPage::SvxGrfCropPage ( Window *pParent, const SfxItemSet &rSet ) SetExchangeSupport(); // set the correct metric - const FieldUnit eMetric = GetModuleFieldUnit( &rSet ); + const FieldUnit eMetric = GetModuleFieldUnit( rSet ); SetFieldUnit( aWidthMF, eMetric ); SetFieldUnit( aHeightMF, eMetric ); @@ -698,7 +698,7 @@ void SvxGrfCropPage::GraphicHasChanged( BOOL bFound ) aBottomMF.SetSpinSize(nSpin); //Originalgroesse anzeigen - const FieldUnit eMetric = GetModuleFieldUnit( &GetItemSet() ); + const FieldUnit eMetric = GetModuleFieldUnit( GetItemSet() ); MetricField aFld(this, WB_HIDE); SetFieldUnit( aFld, eMetric ); diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx index a311fadca64b..23e947d79222 100644 --- a/cui/source/tabpages/labdlg.cxx +++ b/cui/source/tabpages/labdlg.cxx @@ -252,7 +252,7 @@ void SvxCaptionTabPage::Reset( const SfxItemSet& ) //------------Metrik einstellen----------------------------- - FieldUnit eFUnit = GetModuleFieldUnit( &rOutAttrs ); + FieldUnit eFUnit = GetModuleFieldUnit( rOutAttrs ); switch ( eFUnit ) { diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx index 4b00f3289338..fbe40bebdad0 100644 --- a/cui/source/tabpages/measure.cxx +++ b/cui/source/tabpages/measure.cxx @@ -137,7 +137,7 @@ SvxMeasurePage::SvxMeasurePage( Window* pWindow, const SfxItemSet& rInAttrs ) : FreeResource(); - const FieldUnit eFUnit = GetModuleFieldUnit( &rInAttrs ); + const FieldUnit eFUnit = GetModuleFieldUnit( rInAttrs ); SetFieldUnit( aMtrFldLineDist, eFUnit ); SetFieldUnit( aMtrFldHelplineOverhang, eFUnit ); SetFieldUnit( aMtrFldHelplineDist, eFUnit ); diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index 27db31f684fa..2b9a508e060c 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -347,7 +347,7 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : } Init_Impl(); - FieldUnit eFUnit = GetModuleFieldUnit( &rAttr ); + FieldUnit eFUnit = GetModuleFieldUnit( rAttr ); SetFieldUnit( aLeftMarginEdit, eFUnit ); SetFieldUnit( aRightMarginEdit, eFUnit ); SetFieldUnit( aTopMarginEdit, eFUnit ); diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 8800e63d0f86..3f3021162db9 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -440,7 +440,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) String aEmpty; // Metrik einstellen - FieldUnit eFUnit = GetModuleFieldUnit( &rSet ); + FieldUnit eFUnit = GetModuleFieldUnit( rSet ); SetFieldUnit( aLeftIndent, eFUnit ); SetFieldUnit( aRightIndent, eFUnit ); SetFieldUnit( aFLineIndent, eFUnit ); diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index 488eb057418f..0906a49d8937 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -589,7 +589,7 @@ SvxSwPosSizeTabPage::SvxSwPosSizeTabPage( Window* pParent, const SfxItemSet& rIn m_bIsInRightToLeft(false) { FreeResource(); - FieldUnit eDlgUnit = GetModuleFieldUnit( &rInAttrs ); + FieldUnit eDlgUnit = GetModuleFieldUnit( rInAttrs ); SetFieldUnit( m_aHoriByMF, eDlgUnit, TRUE ); SetFieldUnit( m_aVertByMF, eDlgUnit, TRUE ); SetFieldUnit( m_aWidthMF , eDlgUnit, TRUE ); diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index 12b6fd870419..a00a697eaae3 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -153,7 +153,7 @@ SvxTabulatorTabPage::SvxTabulatorTabPage( Window* pParent, // Metrik einstellen - FieldUnit eFUnit = GetModuleFieldUnit( &rAttr ); + FieldUnit eFUnit = GetModuleFieldUnit( rAttr ); SetFieldUnit( aTabBox, eFUnit ); // Buttons initialisieren diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx index 3c7bdbcd4653..07604a8a8bc0 100644 --- a/cui/source/tabpages/textanim.cxx +++ b/cui/source/tabpages/textanim.cxx @@ -140,7 +140,7 @@ SvxTextAnimationPage::SvxTextAnimationPage( Window* pWindow, const SfxItemSet& r { FreeResource(); - eFUnit = GetModuleFieldUnit( &rInAttrs ); + eFUnit = GetModuleFieldUnit( rInAttrs ); SfxItemPool* pPool = rOutAttrs.GetPool(); DBG_ASSERT( pPool, "Wo ist der Pool" ); eUnit = pPool->GetMetric( SDRATTR_TEXT_LEFTDIST ); diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index 6c81356cb334..b008fbe5b625 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -133,7 +133,7 @@ SvxTextAttrPage::SvxTextAttrPage( Window* pWindow, const SfxItemSet& rInAttrs ) { FreeResource(); - FieldUnit eFUnit = GetModuleFieldUnit( &rInAttrs ); + FieldUnit eFUnit = GetModuleFieldUnit( rInAttrs ); SetFieldUnit( aMtrFldLeft, eFUnit ); SetFieldUnit( aMtrFldRight, eFUnit ); SetFieldUnit( aMtrFldTop, eFUnit ); diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index ddeb02a20c1d..ec156bb5e654 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -712,7 +712,7 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : SetExchangeSupport(); // set Metrics - eFUnit = GetModuleFieldUnit( &rInAttrs ); + eFUnit = GetModuleFieldUnit( rInAttrs ); switch ( eFUnit ) { diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index 006099f1fde6..f93056e10028 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -117,7 +117,7 @@ SvxHatchTabPage::SvxHatchTabPage SetExchangeSupport(); // Metrik einstellen - FieldUnit eFUnit = GetModuleFieldUnit( &rInAttrs ); + FieldUnit eFUnit = GetModuleFieldUnit( rInAttrs ); switch ( eFUnit ) { diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 09a5daadfe1d..2b42b27fa02b 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -174,7 +174,7 @@ SvxLineTabPage::SvxLineTabPage SetExchangeSupport(); // Metrik einstellen - FieldUnit eFUnit = GetModuleFieldUnit( &rInAttrs ); + FieldUnit eFUnit = GetModuleFieldUnit( rInAttrs ); switch ( eFUnit ) { diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index f3d92be73278..e39fe7652e9b 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -122,7 +122,7 @@ SvxLineDefTabPage::SvxLineDefTabPage SetExchangeSupport(); // Metrik einstellen - eFUnit = GetModuleFieldUnit( &rInAttrs ); + eFUnit = GetModuleFieldUnit( rInAttrs ); switch ( eFUnit ) { diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index 48d6d627230d..d5e30a087190 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -100,7 +100,7 @@ SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs SetExchangeSupport(); // Metrik einstellen - FieldUnit eFUnit = GetModuleFieldUnit( &rInAttrs ); + FieldUnit eFUnit = GetModuleFieldUnit( rInAttrs ); switch ( eFUnit ) { diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index 57e82898a947..298b12b207f1 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -259,7 +259,7 @@ SvxAngleTabPage::SvxAngleTabPage( Window* pParent, const SfxItemSet& rInAttrs ) void SvxAngleTabPage::Construct() { DBG_ASSERT(pView, "No valid view (!)"); - eDlgUnit = GetModuleFieldUnit(&GetItemSet()); + eDlgUnit = GetModuleFieldUnit(GetItemSet()); SetFieldUnit(aMtrPosX, eDlgUnit, TRUE); SetFieldUnit(aMtrPosY, eDlgUnit, TRUE); @@ -545,7 +545,7 @@ void SvxSlantTabPage::Construct() { // get the range DBG_ASSERT(pView, "no valid view (!)"); - eDlgUnit = GetModuleFieldUnit(&GetItemSet()); + eDlgUnit = GetModuleFieldUnit(GetItemSet()); SetFieldUnit(aMtrRadius, eDlgUnit, TRUE); { // #i75273# @@ -776,7 +776,7 @@ void SvxPositionSizeTabPage::Construct() { // get range and work area DBG_ASSERT( mpView, "no valid view (!)" ); - meDlgUnit = GetModuleFieldUnit( &GetItemSet() ); + meDlgUnit = GetModuleFieldUnit( GetItemSet() ); SetFieldUnit( maMtrPosX, meDlgUnit, TRUE ); SetFieldUnit( maMtrPosY, meDlgUnit, TRUE ); SetFieldUnit( maMtrWidth, meDlgUnit, TRUE ); -- cgit v1.2.3 From 557dd8031d3b8221e2664a8149401226a67d0f08 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 10 Dec 2009 19:12:58 +0100 Subject: #i107450#: move ThesaurusDialog and HyphenWordDialog to cui --- cui/source/dialogs/hyphen.cxx | 516 +++++++++++++++++++++++++++++++++++++++++ cui/source/dialogs/hyphen.hrc | 48 ++++ cui/source/dialogs/hyphen.src | 146 ++++++++++++ cui/source/dialogs/makefile.mk | 4 + cui/source/dialogs/thesdlg.cxx | 494 +++++++++++++++++++++++++++++++++++++++ cui/source/dialogs/thesdlg.hrc | 62 +++++ cui/source/dialogs/thesdlg.src | 211 +++++++++++++++++ cui/source/factory/dlgfact.cxx | 51 ++++ cui/source/factory/dlgfact.hxx | 26 ++- cui/source/inc/cuires.hrc | 4 + cui/source/inc/helpid.hrc | 5 +- cui/source/inc/hyphen.hxx | 122 ++++++++++ cui/source/inc/thesdlg.hxx | 124 ++++++++++ 13 files changed, 1810 insertions(+), 3 deletions(-) create mode 100644 cui/source/dialogs/hyphen.cxx create mode 100644 cui/source/dialogs/hyphen.hrc create mode 100644 cui/source/dialogs/hyphen.src create mode 100644 cui/source/dialogs/thesdlg.cxx create mode 100644 cui/source/dialogs/thesdlg.hrc create mode 100644 cui/source/dialogs/thesdlg.src create mode 100644 cui/source/inc/hyphen.hxx create mode 100644 cui/source/inc/thesdlg.hxx diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx new file mode 100644 index 000000000000..dca6c2ff6dcd --- /dev/null +++ b/cui/source/dialogs/hyphen.cxx @@ -0,0 +1,516 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: hyphen.cxx,v $ + * $Revision: 1.14 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_cui.hxx" + +// include --------------------------------------------------------------- +#include +#include +#include +#include +#include "cuires.hrc" +#include "hyphen.hrc" +#include +#include "hyphen.hxx" +#include +#include +#include +#include +#include +#include "dialmgr.hxx" + +using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::linguistic2; + +#undef S2U +#undef U2S +//#define S2U(s) StringToOUString(s, CHARSET_SYSTEM) +//#define U2S(s) OUStringToString(s, CHARSET_SYSTEM) + +// define ---------------------------------------------------------------- + +#define HYPHHERE '-' +#define CONTINUE_HYPH USHRT_MAX + +// Dies ist nur ein Hack, weil an dieser Stelle das extern char aus hmwrap +// nicht bekannt ist, wird demnaechst in hmwrap durch ein define ersetzt. +#define SW_SOFT_HYPHEN '=' + +// class SvxHyphenEdit --------------------------------------------------- + +SvxHyphenEdit::SvxHyphenEdit( Window* pParent, const ResId& rResId ) : + + Edit( pParent, rResId ) +{ +} + +// ----------------------------------------------------------------------- + +void SvxHyphenEdit::KeyInput( const KeyEvent& rKEvt ) +{ +// sal_uInt16 nMod = rKEvt.GetKeyCode().GetModifier(); + sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode(); + + switch ( nCode ) + { + case KEY_LEFT: + ( (SvxHyphenWordDialog*)GetParent() )->SelLeft(); + break; + + case KEY_RIGHT: + ( (SvxHyphenWordDialog*)GetParent() )->SelRight(); + break; + + case KEY_TAB: + case KEY_ESCAPE: + case KEY_RETURN: + Edit::KeyInput(rKEvt); + break; + default: + Control::KeyInput( rKEvt ); // An den Dialog weiterleiten + break; + } +} + +// class SvxHyphenWordDialog --------------------------------------------- + +SvxHyphenWordDialog::SvxHyphenWordDialog( const String &rWord, LanguageType nLang, + Window* pParent, + Reference< XHyphenator > &xHyphen, + SvxSpellWrapper* pWrapper ) : + SfxModalDialog( pParent, CUI_RES( RID_SVXDLG_HYPHENATE ) ), + + aWordFT ( this, CUI_RES( FT_WORD ) ), + aWordEdit ( this, CUI_RES( ED_WORD ) ), + aLeftBtn ( this, CUI_RES( BTN_LEFT ) ), + aRightBtn ( this, CUI_RES( BTN_RIGHT ) ), + aOkBtn ( this, CUI_RES( BTN_HYPH_CUT ) ), + aCancelBtn ( this, CUI_RES( BTN_HYPH_CANCEL ) ), + aContBtn ( this, CUI_RES( BTN_HYPH_CONTINUE ) ), + aDelBtn ( this, CUI_RES( BTN_HYPH_DELETE ) ), + aHelpBtn ( this, CUI_RES( BTN_HYPH_HELP ) ), + aLabel ( GetText() ), + pHyphWrapper ( pWrapper ), + xHyphenator ( xHyphen ), + aActWord ( rWord ), + nActLanguage ( nLang ), + nHyphPos ( 0 ), + nOldPos ( 0 ), + bBusy ( sal_False ) +{ + aContBtn.SetClickHdl( + LINK( this, SvxHyphenWordDialog, ContinueHdl_Impl ) ); + aOkBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, CutHdl_Impl ) ); + aDelBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, DeleteHdl_Impl ) ); + aCancelBtn.SetClickHdl( + LINK( this, SvxHyphenWordDialog, CancelHdl_Impl ) ); + aLeftBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, Left_Impl ) ); + aRightBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, Right_Impl ) ); + + aWordEdit.SetGetFocusHdl( + LINK( this, SvxHyphenWordDialog, GetFocusHdl_Impl ) ); + + Reference< XHyphenatedWord > xHyphWord( pWrapper ? + pWrapper->GetLast() : Reference< XInterface > () , UNO_QUERY ); + DBG_ASSERT(xHyphWord.is(), "missing hyphenated word"); + nMaxHyphenationPos = xHyphWord.is() ? xHyphWord->getHyphenationPos() : 0; + SetLabel_Impl( nLang ); + + InitControls_Impl(); + aWordEdit.GrabFocus(); + + FreeResource(); + + // disable controls if service is not available + if (!xHyphenator.is()) + Enable( sal_False ); +} + +// ----------------------------------------------------------------------- + +void SvxHyphenWordDialog::SelLeft() +{ + String aTxt( aWordEdit.GetText() ); + + for ( xub_StrLen i = nOldPos + 1; i-- > 0 ; ) + { + DBG_ASSERT(i <= aTxt.Len(), "index out of range"); + if( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) ) + { + aTxt.SetChar( i, sal_Unicode( HYPHHERE ) ); + + if ( nOldPos != 0 && nOldPos != aTxt.Len() ) + aTxt.SetChar( nOldPos, sal_Unicode( SW_SOFT_HYPHEN ) ); + nOldPos = i; + aWordEdit.SetText( aTxt ); + aWordEdit.GrabFocus(); + aWordEdit.SetSelection( Selection( i, i + 1 ) ); + break; + } + } + nHyphPos = GetHyphIndex_Impl(); + EnableLRBtn_Impl(); +} + +// ----------------------------------------------------------------------- + +void SvxHyphenWordDialog::SelRight() +{ + String aTxt( aWordEdit.GetText() ); + + for ( xub_StrLen i = nOldPos + 1; i < aTxt.Len(); ++i ) + { + if( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) ) + { + aTxt.SetChar( i, sal_Unicode( HYPHHERE ) ); + + if ( nOldPos != 0 && nOldPos != aTxt.Len() ) + aTxt.SetChar( nOldPos, sal_Unicode( SW_SOFT_HYPHEN ) ); + nOldPos = i; + aWordEdit.SetText( aTxt ); + aWordEdit.GrabFocus(); + aWordEdit.SetSelection( Selection( i, i + 1 ) ); + break; + } + } + nHyphPos = GetHyphIndex_Impl(); + EnableLRBtn_Impl(); +} + +// ----------------------------------------------------------------------- + +void SvxHyphenWordDialog::EnableLRBtn_Impl() +{ + String aTxt( aWordEdit.GetText() ); + xub_StrLen nLen = aTxt.Len(); + xub_StrLen i; + + aRightBtn.Disable(); + for ( i = nOldPos + 2; i < nLen; ++i ) + { + if ( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) ) + { + aRightBtn.Enable(); + break; + } + } + + DBG_ASSERT(nOldPos < aTxt.Len(), "nOldPos out of range"); + if (nOldPos >= aTxt.Len()) + nOldPos = aTxt.Len() - 1; + aLeftBtn.Disable(); + for ( i = nOldPos; i-- > 0; ) + { + if ( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) ) + { + aLeftBtn.Enable(); + break; + } + } +} + +// ----------------------------------------------------------------------- + + +void SvxHyphenWordDialog::SetLabel_Impl( LanguageType nLang ) +{ + String aLangStr( SvtLanguageTable::GetLanguageString( nLang ) ); + String aTmp( aLabel ); + aTmp.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " (" ) ); + aTmp.Append( aLangStr ); + aTmp.Append( sal_Unicode( ')' ) ); + SetText( aTmp ); +} + +// ----------------------------------------------------------------------- + +String SvxHyphenWordDialog::EraseUnusableHyphens_Impl( + Reference< XPossibleHyphens > &rxPossHyph, + sal_uInt16 _nMaxHyphenationPos ) +{ + // returns a String showing only those hyphen positions which will result + // in a line break if hyphenation is done there + + String aTxt; + DBG_ASSERT(rxPossHyph.is(), "missing possible hyphens"); + if (rxPossHyph.is()) + { + aTxt = String( rxPossHyph->getPossibleHyphens() ); + + Sequence< sal_Int16 > aHyphenationPositions( + rxPossHyph->getHyphenationPositions() ); + sal_Int32 nLen = aHyphenationPositions.getLength(); + const sal_Int16 *pHyphenationPos = aHyphenationPositions.getConstArray(); + + // find position nIdx after which all hyphen positions are unusable + xub_StrLen nIdx = STRING_NOTFOUND, + nPos; + if (nLen) + { + xub_StrLen nStart = 0; + for (sal_Int32 i = 0; i < nLen; ++i) + { + if (pHyphenationPos[i] > _nMaxHyphenationPos) + break; + else + { + // find corresponding hyphen pos in string + nPos = aTxt.Search( sal_Unicode( SW_SOFT_HYPHEN ), nStart ); + + if (nStart == STRING_NOTFOUND) + break; + else + { + nIdx = nPos; + nStart = nPos + 1; + } + } + } + } + DBG_ASSERT(nIdx != STRING_NOTFOUND, "no usable hyphenation position"); + + // remove not usable hyphens from string + nPos = nIdx == STRING_NOTFOUND ? 0 : nIdx + 1; + String aTmp( sal_Unicode( SW_SOFT_HYPHEN ) ), + aEmpty; + while (nPos != STRING_NOTFOUND) + nPos = aTxt.SearchAndReplace( aTmp, aEmpty, nPos + 1 ); + } + return aTxt; +} + +// ----------------------------------------------------------------------- + +void SvxHyphenWordDialog::InitControls_Impl() +{ + String aTxt; + xPossHyph = NULL; + if (xHyphenator.is()) + { + lang::Locale aLocale( SvxCreateLocale(nActLanguage) ); + xPossHyph = xHyphenator->createPossibleHyphens( aActWord, aLocale, + Sequence< PropertyValue >() ); + if (xPossHyph.is()) + { + aTxt = EraseUnusableHyphens_Impl( xPossHyph, nMaxHyphenationPos ); + } + SetLabel_Impl( nActLanguage ); + } + aWordEdit.SetText( aTxt ); + + nOldPos = aTxt.Len(); + SelLeft(); + EnableLRBtn_Impl(); +} + +// ----------------------------------------------------------------------- + +void SvxHyphenWordDialog::ContinueHyph_Impl( sal_uInt16 nInsPos ) +{ + if ( nInsPos != CONTINUE_HYPH && xPossHyph.is()) + { + if (nInsPos) + { + //String aTmp( U2S( xPossHyph->getPossibleHyphens() ) ); + String aTmp( aWordEdit.GetText() ); + DBG_ASSERT(nInsPos <= aTmp.Len() - 2, "wrong hyphen position"); + + sal_uInt16 nIdxPos = 0; + sal_uInt16 i = 0; + sal_Unicode c; + while (i < aTmp.Len() && HYPHHERE != (c = aTmp.GetChar(i++)) ) + { + if (SW_SOFT_HYPHEN == c) + nIdxPos++; + } + + Sequence< sal_Int16 > aSeq = xPossHyph->getHyphenationPositions(); + sal_Int32 nLen = aSeq.getLength(); + DBG_ASSERT(nLen, "empty sequence"); + DBG_ASSERT(nIdxPos < nLen, "index out of range"); + if (nLen && nIdxPos < nLen) + { + nInsPos = aSeq.getConstArray()[ nIdxPos ]; + pHyphWrapper->InsertHyphen( nInsPos ); + } + } + else + { + //! calling with 0 as argument will remove hyphens! + pHyphWrapper->InsertHyphen( nInsPos ); + } + } + + if ( pHyphWrapper->FindSpellError() ) + { + Reference< XHyphenatedWord > xHyphWord( pHyphWrapper->GetLast(), UNO_QUERY ); + + // adapt actual word and language to new found hyphenation result + if(xHyphWord.is()) + { + aActWord = String( xHyphWord->getWord() ); + nActLanguage = SvxLocaleToLanguage( xHyphWord->getLocale() ); + nMaxHyphenationPos = xHyphWord->getHyphenationPos(); + InitControls_Impl(); + } + } + else + EndDialog( RET_OK ); +} + +// ----------------------------------------------------------------------- + +sal_uInt16 SvxHyphenWordDialog::GetHyphIndex_Impl() +{ + sal_uInt16 nPos = 0; + String aTxt(aWordEdit.GetText()); + + for ( sal_uInt16 i=0 ; i < aTxt.Len(); ++i ) + { + sal_Unicode nChar = aTxt.GetChar( i ); + + if ( nChar == HYPHHERE ) + break; + + if ( nChar != SW_SOFT_HYPHEN ) + nPos++; + } + return nPos; +} + +// ----------------------------------------------------------------------- + +IMPL_LINK_INLINE_START( SvxHyphenWordDialog, CutHdl_Impl, Button *, EMPTYARG ) +{ + if( !bBusy ) + { + bBusy = sal_True; + ContinueHyph_Impl( nHyphPos ); + bBusy = sal_False; + } + return 0; +} +IMPL_LINK_INLINE_END( SvxHyphenWordDialog, CutHdl_Impl, Button *, EMPTYARG ) + +// ----------------------------------------------------------------------- + +IMPL_LINK_INLINE_START( SvxHyphenWordDialog, DeleteHdl_Impl, Button *, EMPTYARG ) +{ + if( !bBusy ) + { + bBusy = sal_True; + ContinueHyph_Impl(); + bBusy = sal_False; + } + return 0; +} +IMPL_LINK_INLINE_END( SvxHyphenWordDialog, DeleteHdl_Impl, Button *, EMPTYARG ) + +// ----------------------------------------------------------------------- + +IMPL_LINK_INLINE_START( SvxHyphenWordDialog, ContinueHdl_Impl, Button *, EMPTYARG ) +{ + if( !bBusy ) + { + bBusy = sal_True; + ContinueHyph_Impl( CONTINUE_HYPH ); + bBusy = sal_False; + } + return 0; +} +IMPL_LINK_INLINE_END( SvxHyphenWordDialog, ContinueHdl_Impl, Button *, EMPTYARG ) + +// ----------------------------------------------------------------------- + +IMPL_LINK_INLINE_START( SvxHyphenWordDialog, CancelHdl_Impl, Button *, EMPTYARG ) +{ + if( !bBusy ) + { + bBusy = sal_True; + pHyphWrapper->SpellEnd(); + EndDialog( RET_CANCEL ); + bBusy = sal_False; + } + return 0; +} +IMPL_LINK_INLINE_END( SvxHyphenWordDialog, CancelHdl_Impl, Button *, EMPTYARG ) + +// ----------------------------------------------------------------------- + +IMPL_LINK_INLINE_START( SvxHyphenWordDialog, Left_Impl, Button *, EMPTYARG ) +{ + if( !bBusy ) + { + bBusy = sal_True; + SelLeft(); + bBusy = sal_False; + } + return 0; +} +IMPL_LINK_INLINE_END( SvxHyphenWordDialog, Left_Impl, Button *, EMPTYARG ) + +// ----------------------------------------------------------------------- + +IMPL_LINK_INLINE_START( SvxHyphenWordDialog, Right_Impl, Button *, EMPTYARG ) +{ + if( !bBusy ) + { + bBusy = sal_True; + SelRight(); + bBusy = sal_False; + } + return 0; +} +IMPL_LINK_INLINE_END( SvxHyphenWordDialog, Right_Impl, Button *, EMPTYARG ) + +// ----------------------------------------------------------------------- + +IMPL_LINK_INLINE_START( SvxHyphenWordDialog, GetFocusHdl_Impl, Edit *, EMPTYARG ) +{ + aWordEdit.SetSelection( Selection( nOldPos, nOldPos + 1 ) ); + return 0; +} +IMPL_LINK_INLINE_END( SvxHyphenWordDialog, GetFocusHdl_Impl, Edit *, EMPTYARG ) + +// ----------------------------------------------------------------------- + +IMPL_LINK( SvxHyphenWordDialog, LangError_Impl, void *, nLang ) +{ + // Status anzeigen + String aErr( SvtLanguageTable::GetLanguageString( (LanguageType)(sal_IntPtr)nLang ) ); + aErr += CUI_RESSTR( RID_SVXSTR_HMERR_CHECKINSTALL ); + InfoBox( this, aErr ).Execute(); + return 0; +} + + diff --git a/cui/source/dialogs/hyphen.hrc b/cui/source/dialogs/hyphen.hrc new file mode 100644 index 000000000000..a87b7b6588b8 --- /dev/null +++ b/cui/source/dialogs/hyphen.hrc @@ -0,0 +1,48 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: hyphen.hrc,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_HYPHEN_HRC +#define _SVX_HYPHEN_HRC + +// defines ------------------------------------------------------------------ + +#define ED_WORD 10 +#define BTN_LEFT 11 +#define BTN_RIGHT 12 +#define FT_WORD 13 + +#define BTN_HYPH_CONTINUE 20 +#define BTN_HYPH_DELETE 21 +#define BTN_HYPH_CUT 22 +#define BTN_HYPH_CANCEL 23 +#define BTN_HYPH_HELP 24 + + +#endif + diff --git a/cui/source/dialogs/hyphen.src b/cui/source/dialogs/hyphen.src new file mode 100644 index 000000000000..230bdedaa22f --- /dev/null +++ b/cui/source/dialogs/hyphen.src @@ -0,0 +1,146 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: hyphen.src,v $ + * $Revision: 1.24 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + // include --------------------------------------------------------------- +#include "helpid.hrc" +#include "cuires.hrc" +#include "hyphen.hrc" + +String RID_SVXSTR_HMERR_CHECKINSTALL +{ + /* ### ACHTUNG: Neuer Text in Resource? ist für die Prüfung nicht verfügbar. \nÃœberprüfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewünschte Sprache : ist f³r die Pr³fung nicht verf³gbar. \nšberpr³fen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gew³nschte Sprache */ + /* ### ACHTUNG: Neuer Text in Resource? ist für die Prüfung nicht verfügbar. \nÃœberprüfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewünschte Sprache : ist f³r die Pr³fung nicht verf³gbar. \nšberpr³fen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gew³nschte Sprache */ + Text [ en-US ] = "is not available for spellchecking\nPlease check your installation and install the desired language\n" ; +}; + + // RID_SVXDLG_HYPHENATE -------------------------------------------------- +ModalDialog RID_SVXDLG_HYPHENATE +{ + HelpId = HID_HYPHENATE ; + Size = MAP_APPFONT ( 188 , 100 ) ; + OutputSize = TRUE ; + SvLook = TRUE ; + Text [ en-US ] = "Hyphenation" ; + Moveable = TRUE ; + Edit ED_WORD + { + BORDER = TRUE ; + Pos = MAP_APPFONT ( 6 , 17 ) ; + Size = MAP_APPFONT ( 120 , 12 ) ; + TABSTOP = TRUE ; + LEFT = TRUE ; + }; + ImageButton BTN_LEFT + { + Pos = MAP_APPFONT ( 6 , 33 ) ; + Size = MAP_APPFONT ( 14 , 14 ) ; + TABSTOP = TRUE ; + SYMBOL = IMAGEBUTTON_ARROW_LEFT ; + }; + ImageButton BTN_RIGHT + { + Pos = MAP_APPFONT ( 22 , 33 ) ; + Size = MAP_APPFONT ( 14 , 14 ) ; + TABSTOP = TRUE ; + Symbol = IMAGEBUTTON_ARROW_RIGHT ; + }; + FixedText FT_WORD + { + Pos = MAP_APPFONT ( 6 , 6 ) ; + Size = MAP_APPFONT ( 120 , 8 ) ; + Text [ en-US ] = "~Word" ; + }; + PushButton BTN_HYPH_CONTINUE + { + Pos = MAP_APPFONT ( 132 , 43 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + Text [ en-US ] = "~Next" ; + TABSTOP = TRUE ; + }; + PushButton BTN_HYPH_DELETE + { + Pos = MAP_APPFONT ( 132 , 60 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + Text [ en-US ] = "~Remove" ; + TABSTOP = TRUE ; + }; + OKButton BTN_HYPH_CUT + { + Pos = MAP_APPFONT ( 132 , 6 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + Text [ en-US ] = "~Hyphenate" ; + TABSTOP = TRUE ; + DEFBUTTON = TRUE ; + }; + CancelButton BTN_HYPH_CANCEL + { + Pos = MAP_APPFONT ( 132 , 23 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TABSTOP = TRUE ; + }; + HelpButton BTN_HYPH_HELP + { + Pos = MAP_APPFONT ( 132 , 80 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TABSTOP = TRUE ; + }; +}; + // ******************************************************************* EOF + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cui/source/dialogs/makefile.mk b/cui/source/dialogs/makefile.mk index f7d597a219a1..43cf1c18c0f8 100755 --- a/cui/source/dialogs/makefile.mk +++ b/cui/source/dialogs/makefile.mk @@ -54,6 +54,7 @@ SRC1FILES = \ gallery.src \ grfflt.src \ hangulhanjadlg.src \ + hyphen.src \ hlmarkwn.src \ hyperdlg.src \ iconcdlg.src \ @@ -69,6 +70,7 @@ SRC1FILES = \ srchxtra.src \ svuidlg.src \ tbxform.src \ + thesdlg.src \ zoom.src \ @@ -89,6 +91,7 @@ SLOFILES+=\ $(SLO)$/hlmailtp.obj \ $(SLO)$/hlmarkwn.obj \ $(SLO)$/hltpbase.obj \ + $(SLO)$/hyphen.obj \ $(SLO)$/iconcdlg.obj \ $(SLO)$/insdlg.obj \ $(SLO)$/insrc.obj \ @@ -106,6 +109,7 @@ SLOFILES+=\ $(SLO)$/SpellDialog.obj \ $(SLO)$/splitcelldlg.obj \ $(SLO)$/srchxtra.obj \ + $(SLO)$/thesdlg.obj \ $(SLO)$/zoom.obj \ diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx new file mode 100644 index 000000000000..5cd53e5521c6 --- /dev/null +++ b/cui/source/dialogs/thesdlg.cxx @@ -0,0 +1,494 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: thesdlg.cxx,v $ + * $Revision: 1.21 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_cui.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "cuires.hrc" +#include "thesdlg.hrc" +#include +#include +#include +#include "dialmgr.hxx" +#include + +using namespace ::com::sun::star; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::linguistic2; + +#undef S2U +#undef U2S +//#define S2U(s) StringToOUString(s, CHARSET_SYSTEM) +//#define U2S(s) OUStringToString(s, CHARSET_SYSTEM) + + +// GetReplaceEditString ------------------------------- + +static void GetReplaceEditString( String &rText ) +{ + // The strings returned by the thesaurus saometimes have some + // explanation text put in between '(' and ')' or a trailing '*'. + // These parts should not be put in the ReplaceEdit Text that may get + // inserted into the document. Thus we strip them from the text. + + xub_StrLen nPos = rText.Search( sal_Unicode('(') ); + while (STRING_NOTFOUND != nPos) + { + xub_StrLen nEnd = rText.Search( sal_Unicode(')'), nPos ); + if (STRING_NOTFOUND != nEnd) + rText.Erase( nPos, nEnd-nPos+1 ); + else + break; + nPos = rText.Search( sal_Unicode('(') ); + } + + nPos = rText.Search( sal_Unicode('*') ); + if (STRING_NOTFOUND != nPos) + rText.Erase( nPos ); + + // remove any possible remaining ' ' that may confuse the thesaurus + // when it gets called with the text + rText.EraseLeadingAndTrailingChars( sal_Unicode(' ') ); +} + +// struct ThesDlg_Impl --------------------------------------------------- + +struct ThesDlg_Impl +{ + Reference< XThesaurus > xThesaurus; + ::rtl::OUString aLookUpText; + sal_Int16 nLookUpLanguage; + + ThesDlg_Impl( Reference< XThesaurus > & xThes ); + SfxErrorContext* pErrContext; // ErrorContext, + // w"ahrend der Dialog oben ist +}; + +ThesDlg_Impl::ThesDlg_Impl(Reference< XThesaurus > & xThes) : + xThesaurus (xThes) +{ + pErrContext = NULL; + nLookUpLanguage = LANGUAGE_NONE; +} + + +// class SvxThesaurusLanguageDlg_Impl ------------------------------------ + +class SvxThesaurusLanguageDlg_Impl : public ModalDialog +{ +private: + SvxLanguageBox aLangLB; + FixedLine aLangFL; + OKButton aOKBtn; + CancelButton aCancelBtn; + HelpButton aHelpBtn; + + DECL_LINK( DoubleClickHdl_Impl, ListBox * ); + +public: + SvxThesaurusLanguageDlg_Impl( Window* pParent ); + + sal_uInt16 GetLanguage() const; + void SetLanguage( sal_uInt16 nLang ); +}; + +// ----------------------------------------------------------------------- + + +SvxThesaurusLanguageDlg_Impl::SvxThesaurusLanguageDlg_Impl( Window* pParent ) : + + ModalDialog( pParent, CUI_RES( RID_SVXDLG_THES_LANGUAGE ) ), + + aLangLB ( this, CUI_RES( LB_THES_LANGUAGE ) ), + aLangFL ( this, CUI_RES( FL_THES_LANGUAGE ) ), + aOKBtn ( this, CUI_RES( BTN_LANG_OK ) ), + aCancelBtn ( this, CUI_RES( BTN_LANG_CANCEL ) ), + aHelpBtn ( this, CUI_RES( BTN_LANG_HELP ) ) +{ + FreeResource(); + + aLangLB.SetLanguageList( LANG_LIST_THES_USED, FALSE, FALSE ); + aLangLB.SetDoubleClickHdl( + LINK( this, SvxThesaurusLanguageDlg_Impl, DoubleClickHdl_Impl ) ); +} + + +// ----------------------------------------------------------------------- + +sal_uInt16 SvxThesaurusLanguageDlg_Impl::GetLanguage() const +{ + sal_uInt16 nLang = aLangLB.GetSelectLanguage(); + return nLang; +} + +// ----------------------------------------------------------------------- + +void SvxThesaurusLanguageDlg_Impl::SetLanguage( sal_uInt16 nLang ) +{ + aLangLB.SelectLanguage( nLang ); +} + +// ----------------------------------------------------------------------- + +IMPL_LINK_INLINE_START( SvxThesaurusLanguageDlg_Impl, DoubleClickHdl_Impl, ListBox *, EMPTYARG ) +{ + EndDialog( RET_OK ); + return 0; +} +IMPL_LINK_INLINE_END( SvxThesaurusLanguageDlg_Impl, DoubleClickHdl_Impl, ListBox *, EMPTYARG ) + +// class SvxThesaurusDialog ---------------------------------------------- + + +// ----------------------------------------------------------------------- + + +SvxThesaurusDialog::SvxThesaurusDialog( Window* pParent, Reference< XThesaurus > xThes, + const String &rWord, sal_Int16 nLanguage) : + + SvxStandardDialog( pParent, CUI_RES( RID_SVXDLG_THESAURUS ) ), + + aWordText ( this, CUI_RES( FT_WORD ) ), + aWordLB ( this, CUI_RES( LB_WORD ) ), + aReplaceText( this, CUI_RES( FT_REPL ) ), + aReplaceEdit( this, CUI_RES( ED_REPL ) ), + aMeanText ( this, CUI_RES( FT_MEAN ) ), + aMeanLB ( this, CUI_RES( LB_MEAN ) ), + aSynonymText( this, CUI_RES( FT_SYNON ) ), + aSynonymLB ( this, CUI_RES( LB_SYNON ) ), + aVarFL ( this, CUI_RES( FL_VAR ) ), + aOkBtn ( this, CUI_RES( BTN_THES_OK ) ), + aCancelBtn ( this, CUI_RES( BTN_THES_CANCEL ) ), + aLookUpBtn ( this, CUI_RES( BTN_LOOKUP ) ), + aLangBtn ( this, CUI_RES( BTN_LANGUAGE ) ), + aHelpBtn ( this, CUI_RES( BTN_THES_HELP ) ), + aErrStr ( CUI_RES( STR_ERR_WORDNOTFOUND ) ) +{ + pImpl = new ThesDlg_Impl( xThes ); + pImpl->aLookUpText = ::rtl::OUString( rWord ); + pImpl->nLookUpLanguage = nLanguage; + pImpl->pErrContext = + new SfxErrorContext( ERRCTX_SVX_LINGU_THESAURUS, String(), this, + RID_SVXERRCTX, &DIALOG_MGR() ); + + aLangBtn.SetClickHdl( LINK( this, SvxThesaurusDialog, LanguageHdl_Impl ) ); + aLookUpBtn.SetClickHdl( LINK( this, SvxThesaurusDialog, LookUpHdl_Impl ) ); + aMeanLB.SetSelectHdl( LINK( this, SvxThesaurusDialog, EntryHdl_Impl ) ); + aSynonymLB.SetSelectHdl( LINK( this, SvxThesaurusDialog, SynonymHdl_Impl ) ); + Link aLink = LINK( this, SvxThesaurusDialog, SelectHdl_Impl ); + aMeanLB.SetDoubleClickHdl( aLink ); + aSynonymLB.SetDoubleClickHdl( aLink ); + aWordLB.SetSelectHdl( aLink ); + + FreeResource(); + + ::rtl::OUString aTmp( rWord ); + linguistic::RemoveHyphens( aTmp ); + linguistic::ReplaceControlChars( aTmp ); + aReplaceEdit.SetText( aTmp ); + aWordLB.InsertEntry( aTmp ); + aWordLB.SelectEntry( aTmp ); + + Init_Impl( nLanguage ); + + // disable controls if service is missing + if (!pImpl->xThesaurus.is()) + Enable( sal_False ); +} + + +// ----------------------------------------------------------------------- + +SvxThesaurusDialog::~SvxThesaurusDialog() +{ + delete pImpl->pErrContext; + delete pImpl; +} + +// ----------------------------------------------------------------------- + +uno::Sequence< Reference< XMeaning > > SAL_CALL + SvxThesaurusDialog::queryMeanings_Impl( + ::rtl::OUString& rTerm, + const Locale& rLocale, + const beans::PropertyValues& rProperties ) + throw(lang::IllegalArgumentException, uno::RuntimeException) +{ + uno::Sequence< Reference< XMeaning > > aMeanings( + pImpl->xThesaurus->queryMeanings( rTerm, rLocale, rProperties ) ); + + // text with '.' at the end? + if (0 == aMeanings.getLength() && rTerm.getLength() && + rTerm.getStr()[ rTerm.getLength() - 1 ] == '.') + { + // try again without trailing '.' chars. It may be a word at the + // end of a sentence and not an abbreviation... + String aTxt( rTerm ); + aTxt.EraseTrailingChars( '.' ); + aMeanings = pImpl->xThesaurus->queryMeanings( aTxt, rLocale, rProperties ); + if (aMeanings.getLength()) + { + rTerm = aTxt; + } + } + + return aMeanings; +} + +// ----------------------------------------------------------------------- + +sal_uInt16 SvxThesaurusDialog::GetLanguage() const +{ + return pImpl->nLookUpLanguage; +} + +// ----------------------------------------------------------------------- + +void SvxThesaurusDialog::UpdateMeaningBox_Impl( uno::Sequence< Reference< XMeaning > > *pMeaningSeq ) +{ + // create temporary meaning list if not supplied from somewhere else + sal_Bool bTmpSeq = sal_False; + if (!pMeaningSeq && pImpl->xThesaurus.is()) + { + bTmpSeq = sal_True; + lang::Locale aLocale( SvxCreateLocale( pImpl->nLookUpLanguage ) ); + uno::Sequence< Reference< XMeaning > > aTmpMean = queryMeanings_Impl( + pImpl->aLookUpText, aLocale, Sequence< PropertyValue >() ); + + pMeaningSeq = new Sequence< Reference< XMeaning > > ( aTmpMean ); + + // set new replace edit text if a different look up text was used + // see: queryMeanings_Impl + aReplaceEdit.SetText( pImpl->aLookUpText ); + } + + sal_Int32 nMeaningCount = pMeaningSeq ? pMeaningSeq->getLength() : 0; + const Reference< XMeaning > *pMeaning = pMeaningSeq ? pMeaningSeq->getConstArray() : NULL; + aMeanLB.Clear(); + for ( sal_Int32 i = 0; i < nMeaningCount; ++i ) + aMeanLB.InsertEntry( pMeaning[i]->getMeaning() ); + + // remove temporary meaning list + if (bTmpSeq) + delete pMeaningSeq; + + if (aMeanLB.GetEntryCount() > 0) + aMeanLB.SelectEntryPos(0); + UpdateSynonymBox_Impl(); +} + + +// ----------------------------------------------------------------------- +void SvxThesaurusDialog::UpdateSynonymBox_Impl() +{ + + aSynonymLB.Clear(); + + sal_uInt16 nPos = aMeanLB.GetSelectEntryPos(); // active meaning pos + if (nPos != LISTBOX_ENTRY_NOTFOUND && pImpl->xThesaurus.is()) + { + // get Reference< XMeaning > for selected meaning + lang::Locale aLocale( SvxCreateLocale( pImpl->nLookUpLanguage ) ); + Reference< XMeaning > xMeaning = queryMeanings_Impl( + pImpl->aLookUpText, aLocale, Sequence< PropertyValue >() ) + .getConstArray()[ nPos ]; + + uno::Sequence< ::rtl::OUString > aSynonyms; + if (xMeaning.is()) + aSynonyms = xMeaning->querySynonyms(); + + sal_Int32 nSynonymCount = aSynonyms.getLength(); + const ::rtl::OUString *pSynonym = aSynonyms.getConstArray(); + for ( sal_Int32 i=0; i < nSynonymCount; ++i ) + aSynonymLB.InsertEntry( pSynonym[i] ); + } + +} + +// ----------------------------------------------------------------------- + +void SvxThesaurusDialog::Apply() +{ +} + +// ----------------------------------------------------------------------- +void SvxThesaurusDialog::Init_Impl(sal_Int16 nLanguage) +{ + // Sprache anpassen + String aStr( GetText() ); + aStr.Erase( aStr.Search( sal_Unicode( '(' ) ) - 1 ); + aStr.Append( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( " (" ) ) ); + //aStr += GetLanguageString( (LanguageType)pImpl->pThesaurus->GetLanguage() ); + aStr += SvtLanguageTable::GetLanguageString( (LanguageType) nLanguage ); + aStr.Append( sal_Unicode( ')' ) ); + SetText( aStr ); // Text der Window-Leiste setzen (Wort + Sprache) + + // adapt meanings according to (new) language + UpdateMeaningBox_Impl(); +} + +// ----------------------------------------------------------------------- + +IMPL_LINK( SvxThesaurusDialog, LookUpHdl_Impl, Button *, pBtn ) +{ + + EnterWait(); + + String aText( aReplaceEdit.GetText() ); + + ::rtl::OUString aOldLookUpText = pImpl->aLookUpText; + pImpl->aLookUpText = ::rtl::OUString( aText ); + + uno::Sequence< Reference< XMeaning > > aMeanings; + if (pImpl->xThesaurus.is()) + aMeanings = queryMeanings_Impl( + pImpl->aLookUpText, + SvxCreateLocale( pImpl->nLookUpLanguage ), + Sequence< PropertyValue >() ); + + LeaveWait(); + if ( aMeanings.getLength() == 0 ) + { + if( pBtn == &aCancelBtn ) // called via double click + { + pImpl->aLookUpText = aOldLookUpText; + } + else + { + UpdateMeaningBox_Impl( &aMeanings ); + if( pBtn == &aLookUpBtn ) + InfoBox( this, aErrStr ).Execute(); + } + return 0; + } + + UpdateMeaningBox_Impl( &aMeanings ); + + if ( aWordLB.GetEntryPos( aText ) == LISTBOX_ENTRY_NOTFOUND ) + aWordLB.InsertEntry( aText ); + + aWordLB.SelectEntry( aText ); + aMeanLB.SelectEntryPos( 0 ); + + String aStr( aMeanLB.GetSelectEntry() ); + GetReplaceEditString( aStr ); + aReplaceEdit.SetText( aStr ); + aSynonymLB.SetNoSelection(); + + return 0; +} + +// ----------------------------------------------------------------------- + +IMPL_LINK( SvxThesaurusDialog, LanguageHdl_Impl, Button *, EMPTYARG ) +{ + if (!pImpl->xThesaurus.is()) + return 0; + + SvxThesaurusLanguageDlg_Impl aDlg( this ); + sal_uInt16 nLang = pImpl->nLookUpLanguage; + aDlg.SetLanguage( nLang ); + + if ( aDlg.Execute() == RET_OK ) + { + nLang = aDlg.GetLanguage(); + if (pImpl->xThesaurus->hasLocale( SvxCreateLocale( nLang ) )) + pImpl->nLookUpLanguage = nLang; + UpdateMeaningBox_Impl(); + Init_Impl( nLang ); + } + + return 0; +} + +// ----------------------------------------------------------------------- + +IMPL_LINK( SvxThesaurusDialog, SynonymHdl_Impl, ListBox *, EMPTYARG ) +{ + if ( aSynonymLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND ) + { + String aStr( aSynonymLB.GetSelectEntry() ); + GetReplaceEditString( aStr ); + aReplaceEdit.SetText( aStr ); + } + return 0; +} + +// ----------------------------------------------------------------------- + +IMPL_LINK( SvxThesaurusDialog, SelectHdl_Impl, ListBox *, pBox ) +{ + String aStr( pBox->GetSelectEntry() ); + GetReplaceEditString( aStr ); + aReplaceEdit.SetText( aStr ); + + //! 'aCancelBtn' is used to indicate that the handler is called as result + //! of a double click action. + LookUpHdl_Impl( &aCancelBtn /* ??? &aLookUpBtn */ ); + + return 0; +} + +// ----------------------------------------------------------------------- + +IMPL_LINK( SvxThesaurusDialog, EntryHdl_Impl, ListBox *, EMPTYARG ) +{ + + UpdateSynonymBox_Impl(); + + return 0; +} + +// ----------------------------------------------------------------------- + +IMPL_LINK( SvxThesaurusDialog, SpellErrorHdl_Impl, void *, pError ) +{ + // Der "ubergebene Pointer pError ist die falsche Sprachen-Nummer + LanguageType eLang = (LanguageType)(sal_uIntPtr)pError; + String aErr( SvtLanguageTable::GetLanguageString( eLang ) ); + // Fehlermeldung ausgeben + ErrorHandler::HandleError( + *new StringErrorInfo( ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS, aErr ) ); + return 0; +} + diff --git a/cui/source/dialogs/thesdlg.hrc b/cui/source/dialogs/thesdlg.hrc new file mode 100644 index 000000000000..4292de929236 --- /dev/null +++ b/cui/source/dialogs/thesdlg.hrc @@ -0,0 +1,62 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: thesdlg.hrc,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_THESDLG_HRC +#define _SVX_THESDLG_HRC + +// defines --------------------------------------------------------------- + +#define BTN_THES_OK 10 +#define BTN_THES_CANCEL 11 +#define BTN_LANGUAGE 12 +#define BTN_THES_HELP 13 +#define BTN_LOOKUP 14 +#define FT_WORD 15 +#define LB_WORD 16 +#define FT_MEAN 17 +#define LB_MEAN 18 +#define FT_SYNON 19 +#define LB_SYNON 20 +#define FT_REPL 21 +#define ED_REPL 22 +#define FL_VAR 23 + +#define STR_ERR_WORDNOTFOUND 30 + +// LanguageDialog -------------------------------------------------------- + +#define LB_THES_LANGUAGE 10 +#define FL_THES_LANGUAGE 11 +#define BTN_LANG_OK 12 +#define BTN_LANG_CANCEL 12 +#define BTN_LANG_HELP 13 + + +#endif + diff --git a/cui/source/dialogs/thesdlg.src b/cui/source/dialogs/thesdlg.src new file mode 100644 index 000000000000..5e13fad9da49 --- /dev/null +++ b/cui/source/dialogs/thesdlg.src @@ -0,0 +1,211 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: thesdlg.src,v $ + * $Revision: 1.23 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + // include --------------------------------------------------------------- +#include "cuires.hrc" +#include "thesdlg.hrc" +#include "helpid.hrc" +#include // SID_THESAURUS + +// pragma ---------------------------------------------------------------- + + // RID_SVXDLG_THES ------------------------------------------------------- +ModalDialog RID_SVXDLG_THESAURUS +{ + HelpId = SID_THESAURUS ; + OutputSize = TRUE ; + Size = MAP_APPFONT ( 285 , 116 ) ; + Text [ en-US ] = "Thesaurus" ; + Moveable = TRUE ; + SvLook = TRUE ; + OkButton BTN_THES_OK + { + Pos = MAP_APPFONT ( 219 , 6 ) ; + Size = MAP_APPFONT ( 60 , 14 ) ; + DefButton = TRUE ; + }; + CancelButton BTN_THES_CANCEL + { + Pos = MAP_APPFONT ( 219 , 23 ) ; + Size = MAP_APPFONT ( 60 , 14 ) ; + }; + PushButton BTN_LOOKUP + { + Pos = MAP_APPFONT ( 219 , 40 ) ; + Size = MAP_APPFONT ( 60 , 14 ) ; + Text [ en-US ] = "~Search" ; + }; + PushButton BTN_LANGUAGE + { + Pos = MAP_APPFONT ( 219 , 57 ) ; + Size = MAP_APPFONT ( 60 , 14 ) ; + Text [ en-US ] = "~Language..." ; + }; + HelpButton BTN_THES_HELP + { + Pos = MAP_APPFONT ( 219 , 77 ) ; + Size = MAP_APPFONT ( 60 , 14 ) ; + }; + FixedText FT_WORD + { + Pos = MAP_APPFONT ( 12 , 14 ) ; + Size = MAP_APPFONT ( 96 , 8 ) ; + Text [ en-US ] = "~Word" ; + LEFT = TRUE ; + }; + ListBox LB_WORD + { + DropDown = TRUE ; + Pos = MAP_APPFONT ( 12 , 25 ) ; + Size = MAP_APPFONT ( 96 , 65 ) ; + }; + FixedText FT_MEAN + { + Pos = MAP_APPFONT ( 12 , 43 ) ; + Size = MAP_APPFONT ( 96 , 8 ) ; + Text [ en-US ] = "~Meaning " ; + LEFT = TRUE ; + }; + ListBox LB_MEAN + { + BORDER = TRUE ; + Pos = MAP_APPFONT ( 12 , 55 ) ; + Size = MAP_APPFONT ( 96 , 50 ) ; + AutoHScroll = TRUE ; + }; + FixedText FT_SYNON + { + Pos = MAP_APPFONT ( 111 , 43 ) ; + Size = MAP_APPFONT ( 96 , 8 ) ; + Text [ en-US ] = "Sy~nonym" ; + LEFT = TRUE ; + }; + ListBox LB_SYNON + { + BORDER = TRUE ; + Pos = MAP_APPFONT ( 111 , 55 ) ; + Size = MAP_APPFONT ( 96 , 50 ) ; + AutoHScroll = TRUE ; + }; + FixedText FT_REPL + { + Pos = MAP_APPFONT ( 111 , 14 ) ; + Size = MAP_APPFONT ( 96 , 8 ) ; + Text [ en-US ] = "~Replace" ; + LEFT = TRUE ; + }; + Edit ED_REPL + { + BORDER = TRUE ; + Pos = MAP_APPFONT ( 111 , 25 ) ; + Size = MAP_APPFONT ( 96 , 12 ) ; + LEFT = TRUE ; + }; + FixedLine FL_VAR + { + Pos = MAP_APPFONT ( 6 , 3 ) ; + Size = MAP_APPFONT ( 207 , 8 ) ; + Text [ en-US ] = "Variations" ; + }; + String STR_ERR_WORDNOTFOUND + { + Text [ en-US ] = "Word not found in thesaurus" ; + }; +}; + // RID_SVXDLG_THES_LANGUAGE ---------------------------------------------- +ModalDialog RID_SVXDLG_THES_LANGUAGE +{ + HelpId = HID_THES_LANGUAGE ; + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 170 , 86 ) ; + /* ### ACHTUNG: Neuer Text in Resource? Sprache auswählen : Sprache auswõhlen */ + /* ### ACHTUNG: Neuer Text in Resource? Sprache auswählen : Sprache auswõhlen */ + Text [ en-US ] = "Select Language" ; + Moveable = TRUE ; + ListBox LB_THES_LANGUAGE + { + Border = TRUE ; + Pos = MAP_APPFONT ( 12 , 14 ) ; + Size = MAP_APPFONT ( 90 , 60 ) ; + Sort = TRUE ; + }; + FixedLine FL_THES_LANGUAGE + { + Pos = MAP_APPFONT ( 6 , 3 ) ; + Size = MAP_APPFONT ( 102 , 8 ) ; + Text [ en-US ] = "Selection" ; + }; + OKButton BTN_LANG_OK + { + Pos = MAP_APPFONT ( 114 , 6 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + DefButton = TRUE ; + }; + CancelButton BTN_LANG_CANCEL + { + Pos = MAP_APPFONT ( 114 , 23 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + }; + HelpButton BTN_LANG_HELP + { + Pos = MAP_APPFONT ( 114 , 43 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + }; +}; + // ********************************************************************** EOF + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 10095922f523..d781333f9d47 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -103,6 +103,8 @@ #include "macroass.hxx" #include "acccfg.hxx" #include "insrc.hxx" +#include "hyphen.hxx" +#include "thesdlg.hxx" using namespace ::com::sun::star; using namespace ::com::sun::star::frame; @@ -119,6 +121,8 @@ IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl); IMPL_ABSTDLG_BASE(AbstractSvxDistributeDialog_Impl); IMPL_ABSTDLG_BASE(AbstractHangulHanjaConversionDialog_Impl); IMPL_ABSTDLG_BASE(AbstractFmShowColsDialog_Impl); +IMPL_ABSTDLG_BASE(AbstractHyphenWordDialog_Impl) +IMPL_ABSTDLG_BASE(AbstractThesaurusDialog_Impl) AbstractSvxZoomDialog_Impl::~AbstractSvxZoomDialog_Impl() \ { @@ -356,6 +360,36 @@ String AbstractHangulHanjaConversionDialog_Impl::GetCurrentSuggestion( ) const return pDlg->GetCurrentSuggestion(); } +String AbstractThesaurusDialog_Impl::GetWord() +{ + return pDlg->GetWord(); +}; + +sal_uInt16 AbstractThesaurusDialog_Impl::GetLanguage() const +{ + return pDlg->GetLanguage(); +}; + +Window* AbstractThesaurusDialog_Impl::GetWindow() +{ + return pDlg; +} + +void AbstractHyphenWordDialog_Impl::SelLeft() +{ + pDlg->SelLeft(); +} + +void AbstractHyphenWordDialog_Impl::SelRight() +{ + pDlg->SelRight(); +} + +Window* AbstractHyphenWordDialog_Impl::GetWindow() +{ + return pDlg; +} + Reference < com::sun::star::embed::XEmbeddedObject > AbstractInsertObjectDialog_Impl::GetObject() { return pDlg->GetObject(); @@ -1107,6 +1141,23 @@ AbstractHangulHanjaConversionDialog* AbstractDialogFactory_Impl::CreateHangulHan return new AbstractHangulHanjaConversionDialog_Impl( pDlg ); } +AbstractThesaurusDialog* AbstractDialogFactory_Impl::CreateThesaurusDialog( Window* pParent, + ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XThesaurus > xThesaurus, + const String &rWord, sal_Int16 nLanguage ) +{ + SvxThesaurusDialog* pDlg = new SvxThesaurusDialog( pParent, xThesaurus, rWord, nLanguage ); + return new AbstractThesaurusDialog_Impl( pDlg ); +} + +AbstractHyphenWordDialog* AbstractDialogFactory_Impl::CreateHyphenWordDialog( Window* pParent, + const String &rWord, LanguageType nLang, + ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenator > &xHyphen, + SvxSpellWrapper* pWrapper ) +{ + SvxHyphenWordDialog* pDlg = new SvxHyphenWordDialog( rWord, nLang, pParent, xHyphen, pWrapper ); + return new AbstractHyphenWordDialog_Impl( pDlg ); +} + AbstractFmShowColsDialog * AbstractDialogFactory_Impl::CreateFmShowColsDialog( Window* pParent ) { FmShowColsDialog* pDlg = new FmShowColsDialog( pParent); diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index eb3c7b932597..5773cb8292dd 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -66,6 +66,8 @@ class SvPasteObjectDialog; class SvBaseLinksDlg; class SvxTransformTabDialog; class SvxCaptionTabDialog; +class SvxThesaurusDialog; +class SvxHyphenWordDialog; namespace svx{ class HangulHanjaConversionDialog; @@ -184,7 +186,22 @@ class AbstractHangulHanjaConversionDialog_Impl: public AbstractHangulHanjaConver virtual String GetCurrentSuggestion( ) const; }; -// for HangulHanjaConversionDialog end +class AbstractThesaurusDialog_Impl : public AbstractThesaurusDialog +{ + DECL_ABSTDLG_BASE(AbstractThesaurusDialog_Impl,SvxThesaurusDialog) + virtual String GetWord(); + virtual sal_uInt16 GetLanguage() const; + virtual Window* GetWindow(); +}; + + +class AbstractHyphenWordDialog_Impl: public AbstractHyphenWordDialog +{ + DECL_ABSTDLG_BASE(AbstractHyphenWordDialog_Impl,SvxHyphenWordDialog) + virtual void SelLeft(); + virtual void SelRight(); + virtual Window* GetWindow(); +}; // for FmShowColsDialog begin class FmShowColsDialog; @@ -633,6 +650,13 @@ public: virtual AbstractHangulHanjaConversionDialog * CreateHangulHanjaConversionDialog( Window* _pParent, //add for HangulHanjaConversionDialog CHINA001 HangulHanjaConversion::ConversionDirection _ePrimaryDirection ); + virtual AbstractThesaurusDialog* CreateThesaurusDialog( Window*, ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XThesaurus > xThesaurus, + const String &rWord, sal_Int16 nLanguage ); + + virtual AbstractHyphenWordDialog* CreateHyphenWordDialog( Window*, + const String &rWord, LanguageType nLang, + ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenator > &xHyphen, + SvxSpellWrapper* pWrapper ); virtual AbstractFmShowColsDialog * CreateFmShowColsDialog( Window* pParent ); //add for FmShowColsDialog virtual AbstractSvxZoomDialog * CreateSvxZoomDialog( Window* pParent, //add for SvxZoomDialog diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc index c054d66c4645..7b3530384611 100644 --- a/cui/source/inc/cuires.hrc +++ b/cui/source/inc/cuires.hrc @@ -218,6 +218,10 @@ #define RID_SVX_WND_COMMON_LINGU ( RID_SVX_START + 0 ) #define RID_SVX_GRFFILTER_DLG_EMBOSS_TAB (RID_SVX_START + 337) #define RID_SVXDLG_SEARCHATTR (RID_SVX_START + 22) +#define RID_SVXDLG_HYPHENATE (RID_SVX_START + 30) +#define RID_SVXDLG_THESAURUS (RID_SVX_START + 31) +#define RID_SVXDLG_THES_LANGUAGE (RID_SVX_START + 38) +#define RID_SVXSTR_HMERR_CHECKINSTALL (RID_SVX_START + 94) // hyperlink dialog #define RID_SVXDLG_NEWHYPERLINK (RID_SVX_START + 227) diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc index ad0f7ad12a89..74cb35e2b460 100644 --- a/cui/source/inc/helpid.hrc +++ b/cui/source/inc/helpid.hrc @@ -347,7 +347,7 @@ #define HID_PAGE_TEXTATTR (HID_CUI_START + 308) #define HID_TEXTATTR_CTL_POSITION (HID_CUI_START + 309) #define HID_TRANS_POSITION_SIZE (HID_CUI_START + 310) -// free +#define HID_HYPHENATE (HID_CUI_START + 311) #define HID_SVXPAGE_CHAR_NAME (HID_CUI_START + 312) #define HID_SVXPAGE_CHAR_EFFECTS (HID_CUI_START + 313) #define HID_SVXPAGE_CHAR_POSITION (HID_CUI_START + 314) @@ -373,6 +373,7 @@ #define HID_MACRO_HEADERTABLISTBOX (HID_CUI_START + 335) #define HID_GALLERY_ENTER_TITLE (HID_CUI_START + 336) #define HID_GALLERY_TITLE_EDIT (HID_CUI_START + 337) +#define HID_THES_LANGUAGE (HID_CUI_START + 338) // please adjust ACT_SVX_HID_END2 below if you add entries here! @@ -380,7 +381,7 @@ // Overrun check --------------------------------------------------------- // ----------------------------------------------------------------------- -#define ACT_CUI_HID_END HID_CUI_START + 337 +#define ACT_CUI_HID_END HID_CUI_START + 338 #if ACT_CUI_HID_END > HID_CUI_END #error Resource-Ueberlauf in #line, #file diff --git a/cui/source/inc/hyphen.hxx b/cui/source/inc/hyphen.hxx new file mode 100644 index 000000000000..d91b0e342230 --- /dev/null +++ b/cui/source/inc/hyphen.hxx @@ -0,0 +1,122 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: hyphen.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_HYPHEN_HXX +#define _SVX_HYPHEN_HXX + +// include --------------------------------------------------------------- + +#include +#include +#include +#include +#include + +// forward --------------------------------------------------------------- + +namespace com{namespace sun{namespace star{ +namespace linguistic2{ + class XHyphenator; + class XPossibleHyphens; +}}}} + +class SvxSpellWrapper; + +// class SvxHyphenEdit --------------------------------------------------- + +class SvxHyphenEdit : public Edit +{ +public: + SvxHyphenEdit( Window* pParent, const ResId& rResId ); + +protected: + virtual void KeyInput( const KeyEvent &rKEvt ); +}; + +// class SvxHyphenWordDialog --------------------------------------------- + +class SvxHyphenWordDialog : public SfxModalDialog +{ +public: + SvxHyphenWordDialog( const String &rWord, LanguageType nLang, + Window* pParent, + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenator > &xHyphen, + SvxSpellWrapper* pWrapper ); + + void SelLeft(); + void SelRight(); + +private: + FixedText aWordFT; + SvxHyphenEdit aWordEdit; + ImageButton aLeftBtn; + ImageButton aRightBtn; + OKButton aOkBtn; + CancelButton aCancelBtn; + PushButton aContBtn; + PushButton aDelBtn; + HelpButton aHelpBtn; + String aLabel; + SvxSpellWrapper* pHyphWrapper; + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenator > xHyphenator; + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XPossibleHyphens > xPossHyph; + String aActWord; // actual (to be displayed) word + LanguageType nActLanguage; // and language + sal_uInt16 nMaxHyphenationPos; // right most valid hyphenation pos + sal_uInt16 nHyphPos; + sal_uInt16 nOldPos; + sal_Bool bBusy; + + void EnableLRBtn_Impl(); + void SetLabel_Impl( LanguageType nLang ); + String EraseUnusableHyphens_Impl( + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XPossibleHyphens > &rxPossHyph, + sal_uInt16 nMaxHyphenationPos ); + + void InitControls_Impl(); + void ContinueHyph_Impl( sal_uInt16 nInsPos = 0 ); + sal_uInt16 GetHyphIndex_Impl(); + + DECL_LINK( CutHdl_Impl, Button* ); + DECL_LINK( DeleteHdl_Impl, Button* ); + DECL_LINK( ContinueHdl_Impl, Button* ); + DECL_LINK( CancelHdl_Impl, Button* ); + DECL_LINK( Left_Impl, Button* ); + DECL_LINK( Right_Impl, Button* ); + DECL_LINK( GetFocusHdl_Impl, Edit* ); + DECL_LINK( LangError_Impl, void* ); +}; + + +#endif + diff --git a/cui/source/inc/thesdlg.hxx b/cui/source/inc/thesdlg.hxx new file mode 100644 index 000000000000..bf5fb812946b --- /dev/null +++ b/cui/source/inc/thesdlg.hxx @@ -0,0 +1,124 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: thesdlg.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_THESDLG_HXX +#define _SVX_THESDLG_HXX + +// include --------------------------------------------------------------- + +#include +#include +#include +#include +#include +#include +#include +#include + +// forward --------------------------------------------------------------- + +struct ThesDlg_Impl; + +class SvxThesaurusLanguageDlg_Impl; + +namespace com { namespace sun { namespace star { + namespace linguistic2 { + class XThesaurus; + class XMeaning; + } + namespace lang { + struct Locale; + } +}}} + +// class SvxThesaurusDialog ---------------------------------------------- + +class SvxThesaurusDialog : public SvxStandardDialog +{ +public: + friend class SvxThesaurusLanguageDlg_Impl; + + SvxThesaurusDialog( Window* pParent, + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XThesaurus > xThesaurus, + const String &rWord, sal_Int16 nLanguage ); + ~SvxThesaurusDialog(); + + String GetWord() { return aReplaceEdit.GetText(); } + + sal_uInt16 GetLanguage() const; + +private: + FixedText aWordText; + ListBox aWordLB; + FixedText aReplaceText; + Edit aReplaceEdit; + FixedText aMeanText; + ListBox aMeanLB; + FixedText aSynonymText; + ListBox aSynonymLB; + FixedLine aVarFL; + + OKButton aOkBtn; + CancelButton aCancelBtn; + PushButton aLookUpBtn; + PushButton aLangBtn; + HelpButton aHelpBtn; + + String aErrStr; + + ThesDlg_Impl* pImpl; // always != NULL + + virtual void Apply(); + + void UpdateSynonymBox_Impl(); + void UpdateMeaningBox_Impl( + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XMeaning > > *pMeaningSeq = NULL ); + void Init_Impl(sal_Int16 nLanguage); + + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XMeaning > > + SAL_CALL queryMeanings_Impl( + ::rtl::OUString& rTerm, + const ::com::sun::star::lang::Locale& rLocale, + const ::com::sun::star::beans::PropertyValues& rProperties ) + throw(::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + // Handler + DECL_LINK( SelectHdl_Impl, ListBox * ); + DECL_LINK( SynonymHdl_Impl, ListBox * ); + DECL_LINK( LookUpHdl_Impl, Button * ); + DECL_LINK( LanguageHdl_Impl, Button * ); + DECL_LINK( EntryHdl_Impl, ListBox * ); + DECL_LINK( SpellErrorHdl_Impl, void * ); +}; + +#endif + -- cgit v1.2.3 From d153d2bab7c1f8342438e1dc3ab47344502cf29e Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 10 Dec 2009 23:06:35 +0100 Subject: #i107450#: move SvxSearchIten to svl --- basctl/inc/pch/precompiled_basctl.hxx | 2 +- basctl/source/basicide/ide_pch.hxx | 2 +- basctl/source/basicide/iderdll.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/basctl/inc/pch/precompiled_basctl.hxx b/basctl/inc/pch/precompiled_basctl.hxx index be1612ea7429..b29702a42489 100644 --- a/basctl/inc/pch/precompiled_basctl.hxx +++ b/basctl/inc/pch/precompiled_basctl.hxx @@ -163,7 +163,7 @@ #define ITEMID_LINE 0 #define ITEMID_BRUSH 0 -#include "svx/srchitem.hxx" +#include "svl/srchitem.hxx" #include "svx/flstitem.hxx" #include "svx/fontitem.hxx" #include "svx/postitem.hxx" diff --git a/basctl/source/basicide/ide_pch.hxx b/basctl/source/basicide/ide_pch.hxx index 9f294b87577d..60432ef4745f 100644 --- a/basctl/source/basicide/ide_pch.hxx +++ b/basctl/source/basicide/ide_pch.hxx @@ -106,7 +106,7 @@ #define ITEMID_LINE 0 #define ITEMID_BRUSH 0 -#include +#include #include #include #include diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx index 5f2ed2301758..4ed67919c504 100644 --- a/basctl/source/basicide/iderdll.cxx +++ b/basctl/source/basicide/iderdll.cxx @@ -56,7 +56,7 @@ #define ITEMID_SEARCH 0 -#include +#include #include using ::rtl::OUString; -- cgit v1.2.3 From 084414f1db812898d5ccb476d637c47f3d6dd0c4 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 10 Dec 2009 23:58:52 +0100 Subject: SvxBrushItem does not use sfx code anymore --- cui/source/tabpages/backgrnd.cxx | 5 ++--- cui/source/tabpages/tpline.cxx | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 004b79817b32..58393bfb674b 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -1883,7 +1883,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, if(bGraphTransparency) { - const GraphicObject* pObject = rBgdAttr.GetGraphicObject(SfxObjectShell::Current()); + const GraphicObject* pObject = rBgdAttr.GetGraphicObject(); if(pObject) aGraphTransMF.SetValue(lcl_TransparencyToPercent(pObject->GetAttr().GetTransparency())); else @@ -1903,8 +1903,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, // Grafik ist im Item vorhanden und muss nicht // geladen werden: - const Graphic* pGraphic = - rBgdAttr.GetGraphic( SfxObjectShell::Current() ); + const Graphic* pGraphic = rBgdAttr.GetGraphic(); if ( !pGraphic && aBtnPreview.IsChecked() ) bIsGraphicValid = LoadLinkedGraphic_Impl(); diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 2b42b27fa02b..84410641305f 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -1555,7 +1555,6 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) PopupMenu* pPopup = new PopupMenu; String aEmptyStr; - SfxObjectShell *pDocSh = SfxObjectShell::Current(); nNumMenuGalleryItems=aGrfNames.Count(); for(long i = 0; i < nNumMenuGalleryItems; i++) @@ -1575,7 +1574,7 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) pInfo->pBrushItem = pBrushItem; pInfo->nItemId = (UINT16)(MN_GALLERY_ENTRY + i); aGrfBrushItems.Insert(pInfo, i); - const Graphic* pGraphic = pBrushItem->GetGraphic(pDocSh); + const Graphic* pGraphic = pBrushItem->GetGraphic(); if(pGraphic) { -- cgit v1.2.3 From a06a5334506a80d18c1b1fe72dcbd6ea54abce22 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 11 Dec 2009 11:14:40 +0100 Subject: remove superfluous resource --- cui/source/options/treeopt.src | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/cui/source/options/treeopt.src b/cui/source/options/treeopt.src index 05a67948da04..481eed4e0944 100644 --- a/cui/source/options/treeopt.src +++ b/cui/source/options/treeopt.src @@ -308,39 +308,6 @@ String RID_RIDER_SLL_PERSONAL Text [ en-US ] = "Personal certificates" ; }; -// RID_OFADLG_OPTIONS_TREE_WARNING --------------------------------------- - -ModalDialog RID_OFADLG_OPTIONS_TREE_HINT -{ - OutputSize = TRUE; - Size = MAP_APPFONT( 240, 105 ); - Moveable = TRUE; - Closeable = TRUE; - FixedImage IMG_HINT - { - Pos = MAP_APPFONT( 6, 6 ); - Size = MAP_APPFONT( 30, 30 ); - }; - FixedText FT_HINT - { - Pos = MAP_APPFONT( 39, 6 ); - Size = MAP_APPFONT( 195, 60 ); - WordBreak = TRUE; - Text [ en-US ] = "Please note: the settings displayed refer to the internal browser of %PRODUCTNAME (%PRODUCTNAME Writer/Web). In \"Tools - Options - Browser - External Browser\" the use of a different browser has been activated. In order to be able to use the same settings in other browsers you need to define these in the external browser settings."; - }; - CheckBox CB_DISABLE - { - Pos = MAP_APPFONT( 39, 69 ); - Size = MAP_APPFONT( 195, 12 ); - Text [ en-US ] = "~Do not show information again"; - }; - OKButton BTN_HINT - { - Pos = MAP_APPFONT( 95, 85 ); - Size = MAP_APPFONT( 50, 14 ); - }; -}; - // ******************************************************************* EOF -- cgit v1.2.3 From 053a20463d051b3b6caae759ff60851c6ec2d629 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 11 Dec 2009 12:50:06 +0100 Subject: some forgotten code cleanup --- cui/source/dialogs/winpluginlib.cpp | 4 ---- cui/source/inc/optimprove.hxx | 2 -- cui/source/inc/optlingu.hxx | 15 +++++++-------- cui/source/inc/radiobtnbox.hxx | 3 +-- cui/source/options/connpooloptions.cxx | 6 ------ cui/source/options/connpoolsettings.cxx | 3 --- cui/util/makefile.pmk | 3 --- 7 files changed, 8 insertions(+), 28 deletions(-) diff --git a/cui/source/dialogs/winpluginlib.cpp b/cui/source/dialogs/winpluginlib.cpp index 0b1fced85b40..6f9104bfc29f 100644 --- a/cui/source/dialogs/winpluginlib.cpp +++ b/cui/source/dialogs/winpluginlib.cpp @@ -28,10 +28,6 @@ * ************************************************************************/ -#ifdef SVX_DLLIMPLEMENTATION -#undef SVX_DLLIMPLEMENTATION -#endif - #if defined _MSC_VER #pragma warning(push, 1) #endif diff --git a/cui/source/inc/optimprove.hxx b/cui/source/inc/optimprove.hxx index 61f184239e88..16ea0de5b78c 100644 --- a/cui/source/inc/optimprove.hxx +++ b/cui/source/inc/optimprove.hxx @@ -32,8 +32,6 @@ // include --------------------------------------------------------------- -#include "svx/svxdllapi.h" - #include #include #include diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx index 6c2a0a7ac528..72e147fa9f69 100644 --- a/cui/source/inc/optlingu.hxx +++ b/cui/source/inc/optlingu.hxx @@ -43,7 +43,6 @@ #include #include #include -#include "svx/svxdllapi.h" namespace com{namespace sun{namespace star{ namespace beans{ @@ -110,7 +109,7 @@ public: // class SvxLinguTabPage ------------------------------------------------- -class SVX_DLLPUBLIC SvxLinguTabPage : public SfxTabPage +class SvxLinguTabPage : public SfxTabPage { private: FixedLine aLinguisticFL; @@ -152,11 +151,11 @@ private: SvxLinguData_Impl* pLinguData; - SVX_DLLPRIVATE SvxLinguTabPage( Window* pParent, const SfxItemSet& rCoreSet ); - SVX_DLLPRIVATE SvLBoxEntry* CreateEntry(String& rTxt, USHORT nCol); + SvxLinguTabPage( Window* pParent, const SfxItemSet& rCoreSet ); + SvLBoxEntry* CreateEntry(String& rTxt, USHORT nCol); - SVX_DLLPRIVATE void AddDicBoxEntry( const com::sun::star::uno::Reference< com::sun::star::linguistic2::XDictionary > &rxDic, USHORT nIdx ); - SVX_DLLPRIVATE ULONG GetDicUserData( const com::sun::star::uno::Reference< com::sun::star::linguistic2::XDictionary > &rxDic, USHORT nIdx ); + void AddDicBoxEntry( const com::sun::star::uno::Reference< com::sun::star::linguistic2::XDictionary > &rxDic, USHORT nIdx ); + ULONG GetDicUserData( const com::sun::star::uno::Reference< com::sun::star::linguistic2::XDictionary > &rxDic, USHORT nIdx ); #ifdef _SVX_OPTLINGU_CXX DECL_LINK( SelectHdl_Impl, SvxCheckListBox * ); @@ -166,8 +165,8 @@ private: DECL_LINK( PostDblClickHdl_Impl, SvTreeListBox * ); DECL_LINK( OpenURLHdl_Impl, svt::FixedHyperlink* ); - SVX_DLLPRIVATE void UpdateModulesBox_Impl(); - SVX_DLLPRIVATE void UpdateDicBox_Impl(); + void UpdateModulesBox_Impl(); + void UpdateDicBox_Impl(); #endif public: diff --git a/cui/source/inc/radiobtnbox.hxx b/cui/source/inc/radiobtnbox.hxx index a0477d25b262..fb1fc582f09e 100644 --- a/cui/source/inc/radiobtnbox.hxx +++ b/cui/source/inc/radiobtnbox.hxx @@ -33,13 +33,12 @@ // include --------------------------------------------------------------- #include -#include "svx/svxdllapi.h" namespace svx { // class SvxRadioButtonListBox ------------------------------------------- -class SVX_DLLPUBLIC SvxRadioButtonListBox : public SvxSimpleTable +class SvxRadioButtonListBox : public SvxSimpleTable { using SvxSimpleTable::SetTabs; diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx index fd195b18a7e3..3d6b4280cefc 100644 --- a/cui/source/options/connpooloptions.cxx +++ b/cui/source/options/connpooloptions.cxx @@ -31,18 +31,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_cui.hxx" -#ifdef SVX_DLLIMPLEMENTATION -#undef SVX_DLLIMPLEMENTATION -#endif #include "connpooloptions.hxx" -#ifndef _OFFAPP_CONNPOOLOPTIONS_HRC_ #include "connpooloptions.hrc" -#endif #include #include #include "connpoolsettings.hxx" #include - #include #include "helpid.hrc" #include diff --git a/cui/source/options/connpoolsettings.cxx b/cui/source/options/connpoolsettings.cxx index 03951a4ee271..3d18e50795c3 100644 --- a/cui/source/options/connpoolsettings.cxx +++ b/cui/source/options/connpoolsettings.cxx @@ -31,9 +31,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_cui.hxx" -#ifdef SVX_DLLIMPLEMENTATION -#undef SVX_DLLIMPLEMENTATION -#endif #include "connpoolsettings.hxx" //........................................................................ diff --git a/cui/util/makefile.pmk b/cui/util/makefile.pmk index b2aae3329111..f9e5c100671a 100644 --- a/cui/util/makefile.pmk +++ b/cui/util/makefile.pmk @@ -29,9 +29,6 @@ # #************************************************************************* -# define SVX_DLLIMPLEMENTATION (see @ svxdllapi.h) -CDEFS += -DSVX_DLLIMPLEMENTATION - .IF "$(ENABLE_GTK)" != "" CFLAGS+=-DENABLE_GTK .ENDIF -- cgit v1.2.3 From 0e23b240daf1a41f0d2887e5a3892332c7577980 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Sat, 12 Dec 2009 14:50:57 +0100 Subject: #i107450#: two errors found when rebuilding from scratch --- cui/source/inc/cuisrchdlg.hxx | 16 +--------------- cui/source/options/cuisrchdlg.cxx | 2 +- forms/source/richtext/richtextunowrapper.cxx | 1 + 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/cui/source/inc/cuisrchdlg.hxx b/cui/source/inc/cuisrchdlg.hxx index 93c7779d0ee9..22f4d6e9007a 100644 --- a/cui/source/inc/cuisrchdlg.hxx +++ b/cui/source/inc/cuisrchdlg.hxx @@ -34,34 +34,20 @@ #include -#ifndef _COMBOBOX_HXX //autogen #include -#endif -#ifndef _EDIT_HXX //autogen #include -#endif -#ifndef _LSTBOX_HXX //autogen #include -#endif -#ifndef _BUTTON_HXX //autogen #include -#endif -#ifndef _GROUP_HXX //autogen #include -#endif -#ifndef _FIXED_HXX //autogen #include -#endif -#ifndef _DIALOG_HXX //autogen #include -#endif #include #include #include #define _SVSTDARR_STRINGSDTOR #include #include -#include +#include class SvxJSearchOptionsPage; diff --git a/cui/source/options/cuisrchdlg.cxx b/cui/source/options/cuisrchdlg.cxx index c958204fe3c4..caddf1b729dc 100644 --- a/cui/source/options/cuisrchdlg.cxx +++ b/cui/source/options/cuisrchdlg.cxx @@ -54,7 +54,7 @@ #define ITEMID_SETITEM 0 -#include +#include #include #include #include diff --git a/forms/source/richtext/richtextunowrapper.cxx b/forms/source/richtext/richtextunowrapper.cxx index fa5733ef488c..527fc034903c 100644 --- a/forms/source/richtext/richtextunowrapper.cxx +++ b/forms/source/richtext/richtextunowrapper.cxx @@ -40,6 +40,7 @@ #include #include #include +#include //........................................................................ namespace frm -- cgit v1.2.3 From 06c61003faf8a61f38f7985b58d27e4fb38ef0c6 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 15 Dec 2009 21:55:40 +0100 Subject: #i107706#: liquidate goodies module --- cui/source/inc/cuigaldlg.hxx | 2 +- cui/source/inc/cuigrfflt.hxx | 2 +- cui/source/options/optgdlg.cxx | 2 +- cui/source/options/optmemory.cxx | 2 +- cui/util/makefile.mk | 1 - 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx index ef285bb85448..2c62f6b56f7b 100644 --- a/cui/source/inc/cuigaldlg.hxx +++ b/cui/source/inc/cuigaldlg.hxx @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx index 061ada2568d1..1f9442a22c68 100644 --- a/cui/source/inc/cuigrfflt.hxx +++ b/cui/source/inc/cuigrfflt.hxx @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 2c069130c40d..7e389c4b3d15 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_cui.hxx" #include -#include +#include #include #include #include diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx index a72660ba2e0f..3d0f4d82a68d 100644 --- a/cui/source/options/optmemory.cxx +++ b/cui/source/options/optmemory.cxx @@ -32,7 +32,7 @@ #include "precompiled_cui.hxx" #include #include -#include +#include #include #include #include diff --git a/cui/util/makefile.mk b/cui/util/makefile.mk index bedd1cee6407..120b74098cce 100644 --- a/cui/util/makefile.mk +++ b/cui/util/makefile.mk @@ -64,7 +64,6 @@ SHL1STDLIBS= \ $(SVXLIB) \ $(AVMEDIALIB) \ $(SFX2LIB) \ - $(GOODIESLIB) \ $(BASEGFXLIB) \ $(BASICLIB) \ $(LNGLIB) \ -- cgit v1.2.3 From 062389b010a139129682709876e3d092de234af5 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 8 Jan 2010 18:32:51 +0100 Subject: #i107450#: build all other modules with new editeng lib --- basctl/inc/pch/precompiled_basctl.hxx | 78 +++++++++---------- basctl/sdi/basslots.hrc | 2 +- basctl/source/basicide/basdoc.cxx | 2 +- basctl/source/basicide/basicbox.cxx | 2 +- basctl/source/basicide/baside3.cxx | 2 +- basctl/source/basicide/ide_pch.hxx | 87 ++-------------------- basctl/source/dlged/managelang.cxx | 2 +- basctl/util/makefile.mk | 1 + cui/source/dialogs/SpellDialog.cxx | 9 +-- cui/source/dialogs/commonlingui.hxx | 2 +- cui/source/dialogs/cuicharmap.cxx | 2 +- cui/source/dialogs/cuigaldlg.cxx | 4 +- cui/source/dialogs/hangulhanjadlg.cxx | 4 +- cui/source/dialogs/hyphen.cxx | 6 +- cui/source/dialogs/srchxtra.cxx | 2 +- cui/source/dialogs/thesdlg.cxx | 3 +- cui/source/factory/dlgfact.cxx | 10 +-- cui/source/factory/dlgfact.hxx | 10 +-- cui/source/inc/SpellDialog.hxx | 4 +- cui/source/inc/hangulhanjadlg.hxx | 14 ++-- cui/source/inc/numpages.hxx | 2 +- cui/source/inc/optpath.hxx | 2 +- cui/source/inc/page.hxx | 2 +- cui/source/inc/tabstpge.hxx | 2 +- cui/source/options/cuisrchdlg.cxx | 2 +- cui/source/options/optasian.cxx | 4 +- cui/source/options/optdict.cxx | 2 +- cui/source/options/optgdlg.cxx | 9 ++- cui/source/options/optgenrl.cxx | 1 + cui/source/options/optlingu.cxx | 2 +- cui/source/options/optmemory.cxx | 4 +- cui/source/options/optpath.cxx | 4 +- cui/source/options/treeopt.cxx | 4 +- cui/source/tabpages/align.cxx | 4 +- cui/source/tabpages/autocdlg.cxx | 6 +- cui/source/tabpages/backgrnd.cxx | 11 +-- cui/source/tabpages/border.cxx | 4 +- cui/source/tabpages/borderconn.cxx | 6 +- cui/source/tabpages/chardlg.cxx | 53 ++++++------- cui/source/tabpages/grfpage.cxx | 4 +- cui/source/tabpages/numpages.cxx | 8 +- cui/source/tabpages/page.cxx | 30 ++++---- cui/source/tabpages/paragrph.cxx | 30 ++++---- cui/source/tabpages/tabstpge.cxx | 2 +- cui/source/tabpages/textattr.cxx | 2 +- cui/source/tabpages/tpline.cxx | 8 +- cui/source/tabpages/transfrm.cxx | 4 +- cui/util/makefile.mk | 1 + extensions/source/propctrlr/fontdialog.cxx | 32 ++++---- extensions/source/propctrlr/makefile.mk | 1 + forms/inc/pch/precompiled_forms.hxx | 22 +++--- forms/source/richtext/attributedispatcher.cxx | 2 +- forms/source/richtext/clipboarddispatcher.cxx | 2 +- .../richtext/parametrizedattributedispatcher.cxx | 2 +- forms/source/richtext/richtextcontrol.cxx | 2 +- forms/source/richtext/richtextengine.cxx | 10 +-- forms/source/richtext/richtextengine.hxx | 2 +- forms/source/richtext/richtextimplcontrol.cxx | 12 +-- forms/source/richtext/richtextimplcontrol.hxx | 2 +- forms/source/richtext/richtextmodel.cxx | 2 +- forms/source/richtext/richtextunowrapper.cxx | 8 +- forms/source/richtext/richtextunowrapper.hxx | 4 +- forms/source/richtext/richtextvclcontrol.cxx | 15 ++-- forms/source/richtext/richtextviewport.cxx | 2 +- forms/source/richtext/rtattributehandler.cxx | 16 ++-- forms/source/richtext/rtattributehandler.hxx | 4 +- forms/source/richtext/specialdispatchers.cxx | 6 +- forms/util/makefile.mk | 1 + 68 files changed, 271 insertions(+), 335 deletions(-) diff --git a/basctl/inc/pch/precompiled_basctl.hxx b/basctl/inc/pch/precompiled_basctl.hxx index b29702a42489..82999fa71e4b 100644 --- a/basctl/inc/pch/precompiled_basctl.hxx +++ b/basctl/inc/pch/precompiled_basctl.hxx @@ -164,46 +164,46 @@ #define ITEMID_BRUSH 0 #include "svl/srchitem.hxx" -#include "svx/flstitem.hxx" -#include "svx/fontitem.hxx" -#include "svx/postitem.hxx" -#include "svx/wghtitem.hxx" -#include "svx/fhgtitem.hxx" -#include "svx/fwdtitem.hxx" -#include "svx/udlnitem.hxx" -#include "svx/crsditem.hxx" -#include "svx/shdditem.hxx" -#include "svx/akrnitem.hxx" -#include "svx/wrlmitem.hxx" -#include "svx/cntritem.hxx" -#include "svx/prszitem.hxx" -#include "svx/colritem.hxx" -#include "svx/cscoitem.hxx" -#include "svx/kernitem.hxx" - -#include "svx/cmapitem.hxx" -#include "svx/escpitem.hxx" -#include "svx/langitem.hxx" -#include "svx/nlbkitem.hxx" -#include "svx/nhypitem.hxx" -#include "svx/lcolitem.hxx" -#include "svx/blnkitem.hxx" - -#include "svx/pbinitem.hxx" -#include "svx/sizeitem.hxx" -#include "svx/lrspitem.hxx" -#include "svx/ulspitem.hxx" -#include "svx/prntitem.hxx" -#include "svx/opaqitem.hxx" -#include "svx/protitem.hxx" -#include "svx/shaditem.hxx" -#include "svx/boxitem.hxx" -#include "svx/brkitem.hxx" -#include "svx/keepitem.hxx" -#include "svx/bolnitem.hxx" -#include "svx/brshitem.hxx" +#include "editeng/flstitem.hxx" +#include "editeng/fontitem.hxx" +#include "editeng/postitem.hxx" +#include "editeng/wghtitem.hxx" +#include "editeng/fhgtitem.hxx" +#include "editeng/fwdtitem.hxx" +#include "editeng/udlnitem.hxx" +#include "editeng/crsditem.hxx" +#include "editeng/shdditem.hxx" +#include "editeng/akrnitem.hxx" +#include "editeng/wrlmitem.hxx" +#include "editeng/cntritem.hxx" +#include "editeng/prszitem.hxx" +#include "editeng/colritem.hxx" +#include "editeng/cscoitem.hxx" +#include "editeng/kernitem.hxx" + +#include "editeng/cmapitem.hxx" +#include "editeng/escpitem.hxx" +#include "editeng/langitem.hxx" +#include "editeng/nlbkitem.hxx" +#include "editeng/nhypitem.hxx" +#include "editeng/lcolitem.hxx" +#include "editeng/blnkitem.hxx" + +#include "editeng/pbinitem.hxx" +#include "editeng/sizeitem.hxx" +#include "editeng/lrspitem.hxx" +#include "editeng/ulspitem.hxx" +#include "editeng/prntitem.hxx" +#include "editeng/opaqitem.hxx" +#include "editeng/protitem.hxx" +#include "editeng/shaditem.hxx" +#include "editeng/boxitem.hxx" +#include "editeng/brkitem.hxx" +#include "editeng/keepitem.hxx" +#include "editeng/bolnitem.hxx" +#include "editeng/brshitem.hxx" #include "svx/xmlsecctrl.hxx" -#include "svx/unolingu.hxx" +#include "editeng/unolingu.hxx" #include "xmlscript/xmldlg_imexp.hxx" diff --git a/basctl/sdi/basslots.hrc b/basctl/sdi/basslots.hrc index ca42723efeff..5fc716399614 100644 --- a/basctl/sdi/basslots.hrc +++ b/basctl/sdi/basslots.hrc @@ -29,4 +29,4 @@ ************************************************************************/ #include - +#include diff --git a/basctl/source/basicide/basdoc.cxx b/basctl/source/basicide/basdoc.cxx index 4dd0dbd2aeca..c2c89e12c048 100644 --- a/basctl/source/basicide/basdoc.cxx +++ b/basctl/source/basicide/basdoc.cxx @@ -33,7 +33,7 @@ #include - +#include #define GLOBALOVERFLOW2 diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx index fb73babe54a5..c2e954a26319 100644 --- a/basctl/source/basicide/basicbox.cxx +++ b/basctl/source/basicide/basicbox.cxx @@ -48,7 +48,7 @@ #include "localizationmgr.hxx" #include "managelang.hxx" #include "dlgresid.hrc" -#include +#include #include diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index d33310b6e339..92682768337e 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -64,7 +64,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/basctl/source/basicide/ide_pch.hxx b/basctl/source/basicide/ide_pch.hxx index 60432ef4745f..f1029890f550 100644 --- a/basctl/source/basicide/ide_pch.hxx +++ b/basctl/source/basicide/ide_pch.hxx @@ -29,6 +29,9 @@ ************************************************************************/ #include +#define ITEMID_SEARCH 0 +#define ITEMID_SIZE 0 + #include #include #include @@ -38,6 +41,8 @@ #include #include #include +#include +#include #define _BASIC_TEXTPORTIONS #include @@ -63,86 +68,6 @@ #include #include #include +#include -#define ITEMID_FONT 0 -#define ITEMID_POSTURE 0 -#define ITEMID_WEIGHT 0 -#define ITEMID_SHADOWED 0 -#define ITEMID_CONTOUR 0 -#define ITEMID_CROSSEDOUT 0 -#define ITEMID_UNDERLINE 0 -#define ITEMID_FONTHEIGHT 0 -#define ITEMID_COLOR 0 -#define ITEMID_ADJUST 0 -#define ITEMID_LINESPACING 0 -#define ITEMID_TABSTOP 0 -#define ITEMID_LRSPACE 0 -#define ITEMID_ULSPACE 0 -#define ITEMID_SEARCH 0 -#define ITEMID_SEARCH 0 -#define ITEMID_SIZE 0 -#define ITEMID_FONTLIST 0 -#define ITEMID_AUTOKERN 0 -#define ITEMID_WORDLINEMODE 0 -#define ITEMID_PROPSIZE 0 -#define ITEMID_CHARSETCOLOR 0 -#define ITEMID_KERNING 0 -#define ITEMID_CASEMAP 0 -#define ITEMID_ESCAPEMENT 0 -#define ITEMID_LANGUAGE 0 -#define ITEMID_NOLINEBREAK 0 -#define ITEMID_NOHYPHENHERE 0 -#define ITEMID_BLINK 0 -#define ITEMID_PAPERBIN 0 -#define ITEMID_PRINT 0 -#define ITEMID_OPAQUE 0 -#define ITEMID_PROTECT 0 -#define ITEMID_SHADOW 0 -#define ITEMID_BOX 0 -#define ITEMID_BOXINFO 0 -#define ITEMID_FMTBREAK 0 -#define ITEMID_FMTKEEP 0 -#define ITEMID_LINE 0 -#define ITEMID_BRUSH 0 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx index d1ba13209147..8f797c87bdeb 100644 --- a/basctl/source/dlged/managelang.cxx +++ b/basctl/source/dlged/managelang.cxx @@ -56,7 +56,7 @@ #include #include #include -#include +#include #include diff --git a/basctl/util/makefile.mk b/basctl/util/makefile.mk index 0f2a919ff655..de2514e0ff78 100644 --- a/basctl/util/makefile.mk +++ b/basctl/util/makefile.mk @@ -54,6 +54,7 @@ SHL1TARGET= basctl$(DLLPOSTFIX) SHL1IMPLIB= basctl SHL1BASE = 0x1d800000 SHL1STDLIBS= \ + $(EDITENGLIB) \ $(SVXCORELIB) \ $(SVXLIB) \ $(SFX2LIB) \ diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index a583a708c8b0..ae82dde312ea 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -46,8 +46,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -60,12 +60,11 @@ #include #include #include -#include #include #include #include "SpellDialog.hrc" #include -#include +#include #include #include "SpellDialog.hxx" #include @@ -888,7 +887,7 @@ static Image lcl_GetImageFromPngUrl( const ::rtl::OUString &rFileUrl ) osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp ); Graphic aGraphic; const String aFilterName( RTL_CONSTASCII_USTRINGPARAM( IMP_PNG ) ); - if( GRFILTER_OK == LoadGraphic( aTmp, aFilterName, aGraphic ) ) + if( GRFILTER_OK == GraphicFilter::LoadGraphic( aTmp, aFilterName, aGraphic ) ) { aRes = Image( aGraphic.GetBitmapEx() ); } diff --git a/cui/source/dialogs/commonlingui.hxx b/cui/source/dialogs/commonlingui.hxx index d1781e83348f..a2fb122f8169 100644 --- a/cui/source/dialogs/commonlingui.hxx +++ b/cui/source/dialogs/commonlingui.hxx @@ -34,7 +34,7 @@ #include #include #include -#include +#include #ifndef _SV_BUTTON_HXX #include #endif diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index 83dc06e606a3..ac312730a30d 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include "charmap.hrc" #include "macroass.hxx" diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 426d6fef86ea..5f6ced04de8e 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include "cuigaldlg.hxx" @@ -856,7 +856,7 @@ SfxTabPage* TPGalleryThemeProperties::Create( Window* pParent, const SfxItemSet& void TPGalleryThemeProperties::FillFilterList() { - GraphicFilter* pFilter = GetGrfFilter(); + GraphicFilter* pFilter = GraphicFilter::GetGraphicFilter(); String aExt; String aName; FilterEntry* pFilterEntry; diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index afef3c1edb5f..018184cc46f9 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -53,7 +53,7 @@ #include -#define HHC HangulHanjaConversion +#define HHC editeng::HangulHanjaConversion #define LINE_CNT static_cast< USHORT >(2) //............................................................................. @@ -604,7 +604,7 @@ namespace svx m_pPlayground->GetButton( SvxCommonLinguisticControl::eOptions )->Show(); // m_pPlayground->EnableButton( SvxCommonLinguisticControl::eOptions, true ); - if ( HangulHanjaConversion::eHangulToHanja == _ePrimaryDirection ) + if ( editeng::HangulHanjaConversion::eHangulToHanja == _ePrimaryDirection ) { // m_aHanjaOnly.Enable( sal_False ); m_pIgnoreNonPrimary = &m_aHangulOnly; diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx index dca6c2ff6dcd..b3c3e85b6f10 100644 --- a/cui/source/dialogs/hyphen.cxx +++ b/cui/source/dialogs/hyphen.cxx @@ -38,12 +38,12 @@ #include #include "cuires.hrc" #include "hyphen.hrc" -#include +#include #include "hyphen.hxx" -#include +#include #include #include -#include +#include #include #include "dialmgr.hxx" diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx index 5b28029920cc..6b9f01fb9976 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -43,7 +43,7 @@ #include "srchxtra.hrc" #include // RID_ATTR_BEGIN #include // item resources -#include +#include #include "chardlg.hxx" #include "paragrph.hxx" #include diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index 5cd53e5521c6..6ac180501947 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -44,11 +44,12 @@ #include #include "cuires.hrc" #include "thesdlg.hrc" -#include +#include #include #include #include "dialmgr.hxx" #include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::lang; diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index d781333f9d47..2be763439401 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -274,12 +274,12 @@ void AbstractHangulHanjaConversionDialog_Impl::SetByCharacter( sal_Bool _bByChar pDlg->SetByCharacter(_bByCharacter); } -void AbstractHangulHanjaConversionDialog_Impl::SetConversionDirectionState( sal_Bool _bTryBothDirections, HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection ) +void AbstractHangulHanjaConversionDialog_Impl::SetConversionDirectionState( sal_Bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection ) { pDlg->SetConversionDirectionState(_bTryBothDirections, _ePrimaryConversionDirection); } -void AbstractHangulHanjaConversionDialog_Impl::SetConversionFormat( HangulHanjaConversion::ConversionFormat _eType ) +void AbstractHangulHanjaConversionDialog_Impl::SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType ) { pDlg->SetConversionFormat(_eType); } @@ -328,7 +328,7 @@ sal_Bool AbstractHangulHanjaConversionDialog_Impl::GetUseBothDirections( ) const return pDlg->GetUseBothDirections(); } -HangulHanjaConversion::ConversionDirection AbstractHangulHanjaConversionDialog_Impl::GetDirection( HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const +editeng::HangulHanjaConversion::ConversionDirection AbstractHangulHanjaConversionDialog_Impl::GetDirection( editeng::HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const { return pDlg->GetDirection( _eDefaultDirection ); } @@ -345,7 +345,7 @@ String AbstractHangulHanjaConversionDialog_Impl::GetCurrentString( ) const { return pDlg->GetCurrentString(); } -HangulHanjaConversion::ConversionFormat AbstractHangulHanjaConversionDialog_Impl::GetConversionFormat( ) const +editeng::HangulHanjaConversion::ConversionFormat AbstractHangulHanjaConversionDialog_Impl::GetConversionFormat( ) const { return pDlg->GetConversionFormat(); } @@ -1135,7 +1135,7 @@ AbstractSvxDistributeDialog* AbstractDialogFactory_Impl::CreateSvxDistributeD } AbstractHangulHanjaConversionDialog* AbstractDialogFactory_Impl::CreateHangulHanjaConversionDialog(Window* pParent, - HangulHanjaConversion::ConversionDirection _ePrimaryDirection ) + editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection ) { HangulHanjaConversionDialog* pDlg = new HangulHanjaConversionDialog( pParent, _ePrimaryDirection); return new AbstractHangulHanjaConversionDialog_Impl( pDlg ); diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 5773cb8292dd..f6189c9b486f 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -163,8 +163,8 @@ class AbstractHangulHanjaConversionDialog_Impl: public AbstractHangulHanjaConver virtual void EndDialog(long nResult = 0); virtual void EnableRubySupport( sal_Bool _bVal ); virtual void SetByCharacter( sal_Bool _bByCharacter ) ; - virtual void SetConversionDirectionState( sal_Bool _bTryBothDirections, HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection ); - virtual void SetConversionFormat( HangulHanjaConversion::ConversionFormat _eType ); + virtual void SetConversionDirectionState( sal_Bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection ); + virtual void SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType ); virtual void SetOptionsChangedHdl( const Link& _rHdl ); virtual void SetIgnoreHdl( const Link& _rHdl ); virtual void SetIgnoreAllHdl( const Link& _rHdl ) ; @@ -174,14 +174,14 @@ class AbstractHangulHanjaConversionDialog_Impl: public AbstractHangulHanjaConver virtual void SetConversionFormatChangedHdl( const Link& _rHdl ) ; virtual void SetFindHdl( const Link& _rHdl ); virtual sal_Bool GetUseBothDirections( ) const; - virtual HangulHanjaConversion::ConversionDirection GetDirection( HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const; + virtual editeng::HangulHanjaConversion::ConversionDirection GetDirection( editeng::HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const; virtual void SetCurrentString( const String& _rNewString, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rSuggestions, bool _bOriginatesFromDocument = true ); virtual String GetCurrentString( ) const ; - virtual HangulHanjaConversion::ConversionFormat GetConversionFormat( ) const ; + virtual editeng::HangulHanjaConversion::ConversionFormat GetConversionFormat( ) const ; virtual void FocusSuggestion( ); virtual String GetCurrentSuggestion( ) const; }; @@ -649,7 +649,7 @@ public: virtual SfxAbstractLinksDialog* CreateLinksDialog( Window* pParent, sfx2::SvLinkManager* pMgr, BOOL bHTML, sfx2::SvBaseLink* p=0 ); virtual AbstractHangulHanjaConversionDialog * CreateHangulHanjaConversionDialog( Window* _pParent, //add for HangulHanjaConversionDialog CHINA001 - HangulHanjaConversion::ConversionDirection _ePrimaryDirection ); + editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection ); virtual AbstractThesaurusDialog* CreateThesaurusDialog( Window*, ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XThesaurus > xThesaurus, const String &rWord, sal_Int16 nLanguage ); diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx index 86c41d17452e..dd352fcab91e 100644 --- a/cui/source/inc/SpellDialog.hxx +++ b/cui/source/inc/SpellDialog.hxx @@ -45,13 +45,13 @@ #include -#include +#include #include #include #include #include #include -#include +#include class ScrollBar; class TextEngine; diff --git a/cui/source/inc/hangulhanjadlg.hxx b/cui/source/inc/hangulhanjadlg.hxx index 6c87b8003479..3d9875e43e47 100644 --- a/cui/source/inc/hangulhanjadlg.hxx +++ b/cui/source/inc/hangulhanjadlg.hxx @@ -37,9 +37,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include @@ -146,7 +146,7 @@ namespace svx public: HangulHanjaConversionDialog( Window* _pParent, - HangulHanjaConversion::ConversionDirection _ePrimaryDirection ); + editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection ); ~HangulHanjaConversionDialog( ); public: @@ -173,20 +173,20 @@ namespace svx // retrieves the current suggestion String GetCurrentSuggestion( ) const; - void SetConversionFormat( HangulHanjaConversion::ConversionFormat _eType ); - HangulHanjaConversion::ConversionFormat GetConversionFormat( ) const; + void SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType ); + editeng::HangulHanjaConversion::ConversionFormat GetConversionFormat( ) const; void SetByCharacter( sal_Bool _bByCharacter ); sal_Bool GetByCharacter( ) const; - void SetConversionDirectionState( sal_Bool _bTryBothDirections, HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection ); + void SetConversionDirectionState( sal_Bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection ); // should text which does not match the primary conversion direction be ignored? sal_Bool GetUseBothDirections( ) const; // get current conversion direction to use // (return argument if GetUseBothDirections is true) - HangulHanjaConversion::ConversionDirection GetDirection( HangulHanjaConversion::ConversionDirection eDefaultDirection ) const; + editeng::HangulHanjaConversion::ConversionDirection GetDirection( editeng::HangulHanjaConversion::ConversionDirection eDefaultDirection ) const; // enables or disbales the checkboxes for ruby formatted replacements void EnableRubySupport( sal_Bool bVal ); diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index a5d8a212d48e..342a7ee6609a 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -40,7 +40,7 @@ #include #include #ifndef _SVX_NUMDEF_HXX -#include +#include #endif #include #include diff --git a/cui/source/inc/optpath.hxx b/cui/source/inc/optpath.hxx index c05b0b778c58..cc469c539416 100644 --- a/cui/source/inc/optpath.hxx +++ b/cui/source/inc/optpath.hxx @@ -91,7 +91,7 @@ private: DECL_LINK( PathHdl_Impl, PushButton * ); DECL_LINK( StandardHdl_Impl, PushButton * ); - DECL_LINK( PathSelect_Impl, OptHeaderTabListBox * ); + DECL_LINK( PathSelect_Impl, svx::OptHeaderTabListBox * ); DECL_LINK( HeaderSelect_Impl, HeaderBar * ); DECL_LINK( HeaderEndDrag_Impl, HeaderBar * ); diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx index 1b716aedfd46..c83f8e634f7e 100644 --- a/cui/source/inc/page.hxx +++ b/cui/source/inc/page.hxx @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include diff --git a/cui/source/inc/tabstpge.hxx b/cui/source/inc/tabstpge.hxx index 66d432ea37b4..d22416ad915c 100644 --- a/cui/source/inc/tabstpge.hxx +++ b/cui/source/inc/tabstpge.hxx @@ -38,7 +38,7 @@ #include #include -#include +#include #include // forward --------------------------------------------------------------- diff --git a/cui/source/options/cuisrchdlg.cxx b/cui/source/options/cuisrchdlg.cxx index caddf1b729dc..b2da78b05199 100644 --- a/cui/source/options/cuisrchdlg.cxx +++ b/cui/source/options/cuisrchdlg.cxx @@ -59,7 +59,7 @@ #include #include #include -#include +#include #include "backgrnd.hxx" diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx index 0bbf0ac287bd..8a6057416773 100644 --- a/cui/source/options/optasian.cxx +++ b/cui/source/options/optasian.cxx @@ -32,8 +32,8 @@ #include "precompiled_cui.hxx" #include -#include -#include +#include +#include #include #include #include diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx index e56089dd351e..edfbface5aba 100644 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -33,7 +33,7 @@ // include --------------------------------------------------------------- #include -#include +#include #include #include #include diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index cb9da902c050..0205539a86c6 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -69,12 +69,13 @@ #include #include "cuitabarea.hxx" #include -#include -#include +#include +#include #include #include - - +#include +#include +#include #include #include #include diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx index 85c0d450cc47..6f62f0962db4 100644 --- a/cui/source/options/optgenrl.cxx +++ b/cui/source/options/optgenrl.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #define _SVX_OPTGENRL_CXX diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 7ca67a553278..1dee201213ba 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx index 3d0f4d82a68d..cd813216ab28 100644 --- a/cui/source/options/optmemory.cxx +++ b/cui/source/options/optmemory.cxx @@ -55,8 +55,8 @@ #include #include #include -#include -#include +#include +#include #include "cuioptgenrl.hxx" #include "optpath.hxx" #include "optsave.hxx" diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index 8e004b54b018..b9bd1c52d549 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -256,7 +256,7 @@ SvxPathTabPage::SvxPathTabPage( Window* pParent, const SfxItemSet& rSet ) : Size aHeadSize = pHeaderBar->GetSizePixel(); WinBits nBits = WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP; - pPathBox = new OptHeaderTabListBox( &aPathCtrl, nBits ); + pPathBox = new svx::OptHeaderTabListBox( &aPathCtrl, nBits ); aPathCtrl.SetFocusControl( pPathBox ); pPathBox->SetWindowBits( nBits ); pPathBox->SetDoubleClickHdl( aLink ); @@ -409,7 +409,7 @@ void SvxPathTabPage::FillUserData() // ----------------------------------------------------------------------- -IMPL_LINK( SvxPathTabPage, PathSelect_Impl, OptHeaderTabListBox *, EMPTYARG ) +IMPL_LINK( SvxPathTabPage, PathSelect_Impl, svx::OptHeaderTabListBox *, EMPTYARG ) /* [Beschreibung] diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index b45a19af4a70..c35738807ee7 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -113,7 +113,7 @@ #include "treeopt.hxx" #include "treeopt.hrc" #include "fontsubs.hxx" -#include +#include #include #include "connpoolconfig.hxx" #include "dbregister.hxx" @@ -123,7 +123,7 @@ #ifndef _SVX_LANGITEM_HXX #define ITEMID_LANGUAGE SID_ATTR_CHAR_LANGUAGE -#include +#include #endif diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx index f275cc084877..dcef5e9fa9e7 100644 --- a/cui/source/tabpages/align.cxx +++ b/cui/source/tabpages/align.cxx @@ -35,14 +35,14 @@ #include "align.hxx" -#include +#include #include #include #include "align.hrc" #include #include -#include +#include #include #include #include diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 764a5e0b163e..fcf05709b7cd 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -61,10 +61,10 @@ #include "autocdlg.hxx" #include "autocdlg.hrc" #include "helpid.hrc" -#include -#include +#include +#include #include "cuicharmap.hxx" -#include +#include #include #include // SID_OPEN_SMARTTAGSOPTIONS diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 58393bfb674b..4cff912e5fd5 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -47,20 +47,21 @@ #include #include "backgrnd.hrc" -#include // RID_SVXITEM_COL_WHITE #include +#include +#include +#include // Tabellenhintergrund #define TBL_DEST_CELL 0 #define TBL_DEST_ROW 1 #define TBL_DEST_TBL 2 -#include +#include #include "backgrnd.hxx" #include #include -#include #include #include #include @@ -1171,7 +1172,7 @@ BOOL SvxBackgroundTabPage::LoadLinkedGraphic_Impl() { BOOL bResult = ( aBgdGraphicPath.Len() > 0 ) && - ( GRFILTER_OK == LoadGraphic( aBgdGraphicPath, + ( GRFILTER_OK == GraphicFilter::LoadGraphic( aBgdGraphicPath, aBgdGraphicFilter, aBgdGraphic ) ); return bResult; @@ -1209,7 +1210,7 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl() long nCount = pColorTable->Count(); XColorEntry* pEntry = NULL; Color aColWhite( COL_WHITE ); - String aStrWhite( SVX_RES( RID_SVXITEMS_COLOR_WHITE ) ); + String aStrWhite( EditResId( RID_SVXITEMS_COLOR_WHITE ) ); WinBits nBits = ( aBackgroundColorSet.GetStyle() | WB_ITEMBORDER | WB_NAMEFIELD | WB_NONEFIELD ); aBackgroundColorSet.SetText( SVX_RESSTR( RID_SVXSTR_TRANSPARENT ) ); aBackgroundColorSet.SetStyle( nBits ); diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 955e297f6515..f25ebf1e2f70 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -47,8 +47,8 @@ #include // XColorTable #include -#include -#include +#include +#include #include "border.hxx" #include #include diff --git a/cui/source/tabpages/borderconn.cxx b/cui/source/tabpages/borderconn.cxx index c117e631abbd..35d3c9a69985 100644 --- a/cui/source/tabpages/borderconn.cxx +++ b/cui/source/tabpages/borderconn.cxx @@ -33,10 +33,10 @@ #include "borderconn.hxx" #include -#include "svx/bolnitem.hxx" -#include +#include "editeng/bolnitem.hxx" +#include #include -#include +#include namespace svx { diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 6028fdf97ab9..ba4efe732afe 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -32,7 +32,7 @@ #include "precompiled_cui.hxx" // include --------------------------------------------------------------- -#include +#include #include #include #include @@ -45,6 +45,7 @@ #include #include #include +#include #define _SVX_CHARDLG_CXX #include @@ -54,38 +55,38 @@ #include // XColorTable #include "chardlg.hxx" -#include "svx/fontitem.hxx" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "svx/flstitem.hxx" -#include -#include -#include +#include "editeng/fontitem.hxx" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "editeng/flstitem.hxx" +#include +#include +#include #include "svx/drawitem.hxx" #include "svx/dlgutil.hxx" #include #include "svx/htmlmode.hxx" #include "cuicharmap.hxx" #include "chardlg.h" -#include -#include -#include -#include +#include +#include +#include +#include #include -#include -#include +#include +#include #include //CHINA001 #include //CHINA001 #include //CHINA001 diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index d32b264c3715..13f98fa0e9a9 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -38,8 +38,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 22c13efa37ab..01fae6d60adc 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -43,18 +43,18 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include #include #include "cuicharmap.hxx" -#include +#include #include #include #include @@ -62,7 +62,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index 2b9a508e060c..94b72612666a 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -50,22 +50,24 @@ #include "helpid.hrc" #include "page.hxx" #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "svx/dlgutil.hxx" #include -#include +#include #include #include #include -#include // for RID_SVXSTR_PAPERBIN... -#include // for RID_SVXSTR_PAPERBIN..., RID_SVXPAGE_PAGE +#include // for RID_SVXPAGE_PAGE +#include +#include // for RID_SVXSTR_PAPERBIN..., +#include // #i4219# #include @@ -547,7 +549,7 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) String aBinName; if ( PAPERBIN_PRINTER_SETTINGS == nPaperBin ) - aBinName = SVX_RESSTR( RID_SVXSTR_PAPERBIN_SETTINGS ); + aBinName = EE_RESSTR( RID_SVXSTR_PAPERBIN_SETTINGS ); else aBinName = pImpl->mpDefPrinter->GetPaperBinName( (USHORT)nPaperBin ); @@ -1000,10 +1002,10 @@ IMPL_LINK( SvxPageDescPage, PaperBinHdl_Impl, ListBox *, EMPTYARG ) aPaperTrayBox.SetUpdateMode( FALSE ); aPaperTrayBox.Clear(); USHORT nEntryPos = aPaperTrayBox.InsertEntry( - SVX_RESSTR( RID_SVXSTR_PAPERBIN_SETTINGS ) ); + EE_RESSTR( RID_SVXSTR_PAPERBIN_SETTINGS ) ); aPaperTrayBox.SetEntryData( nEntryPos, (void*)(ULONG)PAPERBIN_PRINTER_SETTINGS ); - String aPaperBin( SVX_RES( RID_SVXSTR_PAPERBIN ) ); + String aPaperBin( EditResId( RID_SVXSTR_PAPERBIN ) ); USHORT nBinCount = pImpl->mpDefPrinter->GetPaperBinCount(); for ( USHORT i = 0; i < nBinCount; ++i ) diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 5722f2e9d279..d82af221450f 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -41,27 +41,27 @@ #define _SVX_PARAGRPH_CXX 0 #include -#include +#include #include #include "paragrph.hrc" #include "paragrph.hxx" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "svx/dlgutil.hxx" #include #include "svx/htmlmode.hxx" -#include +#include #include //add CHINA001 #include //add CHINA001 #include //add CHINA001 diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index a00a697eaae3..52e26830fc3b 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -43,7 +43,7 @@ #include #include "tabstpge.hrc" -#include +#include #include "tabstpge.hxx" #include #include "svx/dlgutil.hxx" diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index b008fbe5b625..2bf4b6a4f359 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -57,7 +57,7 @@ #include "svx/dlgutil.hxx" #include //add CHINA001 #include //add CHINA001 -#include +#include static USHORT pRanges[] = { diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 84410641305f..75dcfe28dab1 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -35,7 +35,7 @@ #ifndef _SVX_SIZEITEM_HXX //autogen -#include +#include #endif #include #include @@ -64,10 +64,10 @@ #include #include #include -#include -#include +#include +#include #include -#include +#include #include #include #include diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index 298b12b207f1..b71fe2b2af56 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -43,12 +43,12 @@ #include #include #include "transfrm.hrc" -#include +#include #include "transfrm.hxx" #include #include "svx/dlgutil.hxx" -#include +#include #include "svx/anchorid.hxx" #include #include diff --git a/cui/util/makefile.mk b/cui/util/makefile.mk index 120b74098cce..715a138e2012 100644 --- a/cui/util/makefile.mk +++ b/cui/util/makefile.mk @@ -60,6 +60,7 @@ SHL1LIBS= \ SHL1STDLIBS= \ + $(EDITENGLIB) \ $(SVXCORELIB) \ $(SVXLIB) \ $(AVMEDIALIB) \ diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index c5675c3daa40..22575f404247 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -54,24 +54,24 @@ #include #include "formstrings.hxx" #include "fontitemids.hxx" -#include +#include #ifndef _SVX_EMPHITEM_HXX -#include +#include #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/extensions/source/propctrlr/makefile.mk b/extensions/source/propctrlr/makefile.mk index 9b9ffe47aa15..c70db079ae8f 100644 --- a/extensions/source/propctrlr/makefile.mk +++ b/extensions/source/propctrlr/makefile.mk @@ -120,6 +120,7 @@ SHL1TARGET= $(TARGET)$(DLLPOSTFIX) SHL1VERSIONMAP= $(TARGET).map SHL1STDLIBS= \ + $(EDITENGLIB) \ $(SVXCORELIB) \ $(SVXLIB) \ $(SFXLIB) \ diff --git a/forms/inc/pch/precompiled_forms.hxx b/forms/inc/pch/precompiled_forms.hxx index 402323630361..a04c6fea88da 100644 --- a/forms/inc/pch/precompiled_forms.hxx +++ b/forms/inc/pch/precompiled_forms.hxx @@ -346,18 +346,18 @@ #include "svl/solar.hrc" #include "svtools/transfer.hxx" -#include "svx/editdata.hxx" -#include "svx/editeng.hxx" -#include "svx/editobj.hxx" -#include "svx/editstat.hxx" -#include "svx/editview.hxx" -#include "svx/eeitem.hxx" -#include "svx/frmdir.hxx" -#include "svx/scripttypeitem.hxx" -#include "svx/svxenum.hxx" +#include "editeng/editdata.hxx" +#include "editeng/editeng.hxx" +#include "editeng/editobj.hxx" +#include "editeng/editstat.hxx" +#include "editeng/editview.hxx" +#include "editeng/eeitem.hxx" +#include "editeng/frmdir.hxx" +#include "editeng/scripttypeitem.hxx" +#include "editeng/svxenum.hxx" #include "svx/svxids.hrc" -#include "svx/unoedsrc.hxx" -#include "svx/unofored.hxx" +#include "editeng/unoedsrc.hxx" +#include "editeng/unofored.hxx" #include "toolkit/helper/emptyfontdescriptor.hxx" diff --git a/forms/source/richtext/attributedispatcher.cxx b/forms/source/richtext/attributedispatcher.cxx index e7fd029a86bd..9610bf84b10c 100644 --- a/forms/source/richtext/attributedispatcher.cxx +++ b/forms/source/richtext/attributedispatcher.cxx @@ -34,7 +34,7 @@ /** === begin UNO includes === **/ /** === end UNO includes === **/ -#include +#include //........................................................................ namespace frm diff --git a/forms/source/richtext/clipboarddispatcher.cxx b/forms/source/richtext/clipboarddispatcher.cxx index eca90f30ddc2..3a6199abf013 100644 --- a/forms/source/richtext/clipboarddispatcher.cxx +++ b/forms/source/richtext/clipboarddispatcher.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_forms.hxx" #include "clipboarddispatcher.hxx" -#include +#include /** === begin UNO includes === **/ #include diff --git a/forms/source/richtext/parametrizedattributedispatcher.cxx b/forms/source/richtext/parametrizedattributedispatcher.cxx index 9f6c4c15ed68..10309a986fa5 100644 --- a/forms/source/richtext/parametrizedattributedispatcher.cxx +++ b/forms/source/richtext/parametrizedattributedispatcher.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_forms.hxx" #include "parametrizedattributedispatcher.hxx" -#include +#include #include #include diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx index 9150eac63e17..8cb7fb7ba0bf 100644 --- a/forms/source/richtext/richtextcontrol.cxx +++ b/forms/source/richtext/richtextcontrol.cxx @@ -52,7 +52,7 @@ #include #include -#include +#include #include #include #include diff --git a/forms/source/richtext/richtextengine.cxx b/forms/source/richtext/richtextengine.cxx index b87d6260b723..d40396c59356 100644 --- a/forms/source/richtext/richtextengine.cxx +++ b/forms/source/richtext/richtextengine.cxx @@ -32,14 +32,14 @@ #include "precompiled_forms.hxx" #include "richtextengine.hxx" #include -#include -#include +#include +#include #define ITEMID_FONTHEIGHT EE_CHAR_FONTHEIGHT -#include +#include #define ITEMID_FONT EE_CHAR_FONTHEIGHT -#include +#include #define ITEMID_LANGUAGE EE_CHAR_LANGUAGE -#include +#include #include #include #include diff --git a/forms/source/richtext/richtextengine.hxx b/forms/source/richtext/richtextengine.hxx index 6e0052a26da7..f7231d663bc4 100644 --- a/forms/source/richtext/richtextengine.hxx +++ b/forms/source/richtext/richtextengine.hxx @@ -30,7 +30,7 @@ #ifndef FORMS_SOURCE_RICHTEXT_RICHTEXTENGINE_HXX #define FORMS_SOURCE_RICHTEXT_RICHTEXTENGINE_HXX -#include +#include #include #include diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx index 259197ac71d1..f2c560e51d50 100644 --- a/forms/source/richtext/richtextimplcontrol.cxx +++ b/forms/source/richtext/richtextimplcontrol.cxx @@ -33,16 +33,16 @@ #include "richtextimplcontrol.hxx" #include "textattributelistener.hxx" #include "richtextengine.hxx" -#include -#include -#include -#include +#include +#include +#include +#include #ifndef _SVX_SVXIDS_HRC #include #endif -#include +#include -#include +#include #include #include #include diff --git a/forms/source/richtext/richtextimplcontrol.hxx b/forms/source/richtext/richtextimplcontrol.hxx index 65e138b4f093..c162c977c1b2 100644 --- a/forms/source/richtext/richtextimplcontrol.hxx +++ b/forms/source/richtext/richtextimplcontrol.hxx @@ -34,7 +34,7 @@ #include "richtextviewport.hxx" #include "richtextengine.hxx" #include -#include +#include #include diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx index d38b350ada32..066f083c735d 100644 --- a/forms/source/richtext/richtextmodel.cxx +++ b/forms/source/richtext/richtextmodel.cxx @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include diff --git a/forms/source/richtext/richtextunowrapper.cxx b/forms/source/richtext/richtextunowrapper.cxx index 527fc034903c..84eac6ce544c 100644 --- a/forms/source/richtext/richtextunowrapper.cxx +++ b/forms/source/richtext/richtextunowrapper.cxx @@ -35,12 +35,12 @@ /** === begin UNO includes === **/ #include /** === end UNO includes === **/ -#include -#include -#include +#include +#include +#include #include #include -#include +#include //........................................................................ namespace frm diff --git a/forms/source/richtext/richtextunowrapper.hxx b/forms/source/richtext/richtextunowrapper.hxx index 3a0e1a4aec47..af8ccde76d87 100644 --- a/forms/source/richtext/richtextunowrapper.hxx +++ b/forms/source/richtext/richtextunowrapper.hxx @@ -31,8 +31,8 @@ #ifndef FORMS_SOURCE_RICHTEXT_RICHTEXTUNOWRAPPER_HXX #define FORMS_SOURCE_RICHTEXT_RICHTEXTUNOWRAPPER_HXX -#include -#include +#include +#include //........................................................................ namespace frm diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx index 495a85c02162..f1648f08e905 100644 --- a/forms/source/richtext/richtextvclcontrol.cxx +++ b/forms/source/richtext/richtextvclcontrol.cxx @@ -53,13 +53,14 @@ #endif #include "com/sun/star/ui/dialogs/TemplateDescription.hpp" #endif -#include -#include -#include -#include -#include -#include - +#include +#include +#include +#include +#include +#include +#include +#include #include //........................................................................ diff --git a/forms/source/richtext/richtextviewport.cxx b/forms/source/richtext/richtextviewport.cxx index e85a8cf26035..c5e23b2cc607 100644 --- a/forms/source/richtext/richtextviewport.cxx +++ b/forms/source/richtext/richtextviewport.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_forms.hxx" #include "richtextviewport.hxx" -#include +#include //........................................................................ namespace frm diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx index d1090b82d914..2ebbbbd6bb4a 100644 --- a/forms/source/richtext/rtattributehandler.cxx +++ b/forms/source/richtext/rtattributehandler.cxx @@ -35,7 +35,7 @@ #ifndef _SVX_SVXIDS_HRC #include #endif -#include +#include #include #include #include @@ -43,18 +43,18 @@ #include #define ITEMID_ADJUST EE_PARA_JUST -#include +#include #define ITEMID_WEIGHT EE_CHAR_WEIGHT -#include +#include #define ITEMID_ESCAPEMENT EE_CHAR_ESCAPEMENT -#include +#include #define ITEMID_LINESPACING EE_PARA_SBL -#include +#include #define ITEMID_FONTHEIGHT EE_CHAR_FONTHEIGHT -#include +#include #define ITEMID_FRAMEDIR EE_PARA_WRITINGDIR -#include -#include +#include +#include //........................................................................ namespace frm diff --git a/forms/source/richtext/rtattributehandler.hxx b/forms/source/richtext/rtattributehandler.hxx index cca6723d5f7a..41db86982e4c 100644 --- a/forms/source/richtext/rtattributehandler.hxx +++ b/forms/source/richtext/rtattributehandler.hxx @@ -33,8 +33,8 @@ #include "rtattributes.hxx" #include -#include -#include +#include +#include class SfxItemSet; class SfxPoolItem; diff --git a/forms/source/richtext/specialdispatchers.cxx b/forms/source/richtext/specialdispatchers.cxx index a9176b8d3350..c9e7be22aea3 100644 --- a/forms/source/richtext/specialdispatchers.cxx +++ b/forms/source/richtext/specialdispatchers.cxx @@ -31,13 +31,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_forms.hxx" #include "specialdispatchers.hxx" -#include -#include +#include +#include #ifndef _SVX_SVXIDS_HRC #include #endif #define ITEMID_SCRIPTSPACE SID_ATTR_PARA_SCRIPTSPACE -#include +#include //........................................................................ namespace frm diff --git a/forms/util/makefile.mk b/forms/util/makefile.mk index 1c454b1383db..a7a649473aad 100644 --- a/forms/util/makefile.mk +++ b/forms/util/makefile.mk @@ -58,6 +58,7 @@ LIB1FILES=\ SHL1TARGET=$(TARGET)$(DLLPOSTFIX) SHL1STDLIBS= \ + $(EDITENGLIB) \ $(SALLIB) \ $(CPPULIB) \ $(CPPUHELPERLIB) \ -- cgit v1.2.3 From cd7c2747e0d9f8827f81165f4ef0a8672b980377 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Wed, 13 Jan 2010 22:25:07 +0100 Subject: #i107450#: move more code out of svx --- cui/source/dialogs/SpellDialog.cxx | 2 +- cui/source/dialogs/linkdlg.cxx | 12 ++++++------ cui/source/factory/dlgfact.cxx | 2 +- cui/source/factory/dlgfact.hxx | 2 +- cui/source/inc/linkdlg.hxx | 8 ++++---- cui/source/options/optasian.cxx | 2 +- cui/source/options/opthtml.cxx | 3 +-- cui/source/options/optinet2.hxx | 2 +- cui/source/options/optlingu.cxx | 2 +- cui/source/options/treeopt.cxx | 2 +- 10 files changed, 18 insertions(+), 19 deletions(-) diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index ae82dde312ea..7f21c48a3212 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -63,7 +63,7 @@ #include #include #include "SpellDialog.hrc" -#include +#include #include #include #include "SpellDialog.hxx" diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index 106e3b898243..2fd234b3f02e 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -77,7 +77,7 @@ static long nTabs[] = }; -SvBaseLinksDlg::SvBaseLinksDlg( Window * pParent, SvLinkManager* pMgr, BOOL bHtml ) +SvBaseLinksDlg::SvBaseLinksDlg( Window * pParent, LinkManager* pMgr, BOOL bHtml ) : ModalDialog( pParent, CUI_RES( MD_UPDATE_BASELINKS ) ), aFtFiles( this, CUI_RES( FT_FILES ) ), aFtLinks( this, CUI_RES( FT_LINKS ) ), @@ -304,7 +304,7 @@ IMPL_LINK( SvBaseLinksDlg, UpdateNowClickHdl, PushButton *, EMPTYARG ) } // falls jemand der Meinung ist, seine Links auszutauschen (SD) - SvLinkManager* pNewMgr = pLinkMgr; + LinkManager* pNewMgr = pLinkMgr; pLinkMgr = 0; SetManager( pNewMgr ); @@ -391,7 +391,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton ) } if( pLinkMgr->GetPersist() ) pLinkMgr->GetPersist()->SetModified(); - SvLinkManager* pNewMgr = pLinkMgr; + LinkManager* pNewMgr = pLinkMgr; pLinkMgr = 0; SetManager( pNewMgr ); } @@ -436,7 +436,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) if( bNewLnkMgr ) { - SvLinkManager* pNewMgr = pLinkMgr; + LinkManager* pNewMgr = pLinkMgr; pLinkMgr = 0; SetManager( pNewMgr ); @@ -554,7 +554,7 @@ IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink ) } else { - SvLinkManager* pNewMgr = pLinkMgr; + LinkManager* pNewMgr = pLinkMgr; pLinkMgr = 0; SetManager( pNewMgr ); } @@ -582,7 +582,7 @@ String SvBaseLinksDlg::ImplGetStateStr( const SvBaseLink& rLnk ) return sRet; } -void SvBaseLinksDlg::SetManager( SvLinkManager* pNewMgr ) +void SvBaseLinksDlg::SetManager( LinkManager* pNewMgr ) { if( pLinkMgr == pNewMgr ) return; diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 2be763439401..083a7d1d0936 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -1922,7 +1922,7 @@ SfxAbstractPasteDialog* AbstractDialogFactory_Impl::CreatePasteDialog( Window* p return new AbstractPasteDialog_Impl( new SvPasteObjectDialog( pParent ) ); } -SfxAbstractLinksDialog* AbstractDialogFactory_Impl::CreateLinksDialog( Window* pParent, sfx2::SvLinkManager* pMgr, BOOL bHTML, sfx2::SvBaseLink* p) +SfxAbstractLinksDialog* AbstractDialogFactory_Impl::CreateLinksDialog( Window* pParent, sfx2::LinkManager* pMgr, BOOL bHTML, sfx2::SvBaseLink* p) { SvBaseLinksDlg* pLinkDlg = new SvBaseLinksDlg( pParent, pMgr, bHTML ); if ( p ) diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index f6189c9b486f..daa6cbc9ac0b 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -646,7 +646,7 @@ public: virtual VclAbstractDialog* CreateEditObjectDialog( Window* pParent, USHORT nSlotId, const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& xObj ); virtual SfxAbstractPasteDialog* CreatePasteDialog( Window* pParent ); - virtual SfxAbstractLinksDialog* CreateLinksDialog( Window* pParent, sfx2::SvLinkManager* pMgr, BOOL bHTML, sfx2::SvBaseLink* p=0 ); + virtual SfxAbstractLinksDialog* CreateLinksDialog( Window* pParent, sfx2::LinkManager* pMgr, BOOL bHTML, sfx2::SvBaseLink* p=0 ); virtual AbstractHangulHanjaConversionDialog * CreateHangulHanjaConversionDialog( Window* _pParent, //add for HangulHanjaConversionDialog CHINA001 editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection ); diff --git a/cui/source/inc/linkdlg.hxx b/cui/source/inc/linkdlg.hxx index 4703079c9420..2234fce13281 100644 --- a/cui/source/inc/linkdlg.hxx +++ b/cui/source/inc/linkdlg.hxx @@ -48,7 +48,7 @@ *************************************************************************/ namespace sfx2 { - class SvLinkManager; + class LinkManager; class SvBaseLink; } @@ -83,7 +83,7 @@ class SvBaseLinksDlg : public ModalDialog String aStrCloselinkmsg; String aStrCloselinkmsgMulti; String aStrWaitinglink; - sfx2::SvLinkManager* pLinkMgr; + sfx2::LinkManager* pLinkMgr; BOOL bHtmlMode; SvTabListBox aTbLinks; Timer aUpdateTimer; @@ -126,10 +126,10 @@ class SvBaseLinksDlg : public ModalDialog String& Closelinkmsg() { return aStrCloselinkmsg; } String& CloselinkmsgMulti() { return aStrCloselinkmsgMulti; } String& Waitinglink() { return aStrWaitinglink; } - void SetManager( sfx2::SvLinkManager* ); + void SetManager( sfx2::LinkManager* ); public: - SvBaseLinksDlg( Window * pParent, sfx2::SvLinkManager*, BOOL bHtml = FALSE ); + SvBaseLinksDlg( Window * pParent, sfx2::LinkManager*, BOOL bHtml = FALSE ); ~SvBaseLinksDlg(); void SetActLink( sfx2::SvBaseLink * pLink ); }; diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx index 8a6057416773..2a663a0d440a 100644 --- a/cui/source/options/optasian.cxx +++ b/cui/source/options/optasian.cxx @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx index bddcd4a9e182..47167a474db5 100644 --- a/cui/source/options/opthtml.cxx +++ b/cui/source/options/opthtml.cxx @@ -34,8 +34,7 @@ // include --------------------------------------------------------------- #include - -#include +#include #include "opthtml.hxx" #include "opthtml.hrc" #include diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx index 00d1aaadc4fc..5664a71b1bbd 100644 --- a/cui/source/options/optinet2.hxx +++ b/cui/source/options/optinet2.hxx @@ -38,7 +38,7 @@ #include #include #include -#include +#include #ifdef _SVX_OPTINET2_CXX #include diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 1dee201213ba..3193ec48e99f 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -73,7 +73,7 @@ #include "optlingu.hrc" #include -#include +#include #include "optlingu.hxx" #include #include diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index c35738807ee7..8d28994b7a30 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -127,7 +127,7 @@ #endif -#include +#include #include #include -- cgit v1.2.3 From edd01418d9b6650f6d923e84f335c90b7f001bb0 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 14 Jan 2010 18:08:36 +0100 Subject: #i107450#: more files moved out of svx --- cui/source/dialogs/cuigaldlg.cxx | 2 +- cui/source/tabpages/backgrnd.cxx | 2 +- cui/source/tabpages/numpages.cxx | 2 +- cui/source/tabpages/tpbitmap.cxx | 2 +- cui/source/tabpages/tpline.cxx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 5f6ced04de8e..228fafd29758 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 4cff912e5fd5..3add36afda6a 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -61,7 +61,7 @@ #include "backgrnd.hxx" #include -#include +#include #include #include #include diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 01fae6d60adc..a051189fcffe 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -76,7 +76,7 @@ #include #include -#include "svx/opengrf.hxx" +#include "sfx2/opengrf.hxx" #include //CHINA001 #include //CHINA001 diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index f34afb49a823..3719f260a7fa 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -73,7 +73,7 @@ //#include "dlgname.hrc" #include //CHINA001 #include -#include "svx/opengrf.hxx" +#include "sfx2/opengrf.hxx" #define DLGWIN this->GetParent()->GetParent() diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 75dcfe28dab1..e63657ea6e35 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -71,7 +71,7 @@ #include #include #include -#include "svx/opengrf.hxx" +#include "sfx2/opengrf.hxx" #include #include -- cgit v1.2.3 From aa2a9c2c4a94bf12b723bb55aec1895309555ca4 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 19 Jan 2010 08:02:04 +0100 Subject: #i107450#: use reliable way to access attribute name strings --- cui/source/dialogs/srchxtra.cxx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx index 6b9f01fb9976..1daecd2d39bc 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -49,6 +49,7 @@ #include #include "backgrnd.hxx" #include // RID_SVXPAGE_... +#include // class SvxSearchFormatDialog ------------------------------------------- @@ -161,6 +162,7 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog( Window* pParent, SfxObjectShell* pSh = SfxObjectShell::Current(); DBG_ASSERT( pSh, "No DocShell" ); + ResStringArray aAttrNames( SVX_RES( RID_ATTR_NAMES ) ); SfxItemPool& rPool = pSh->GetPool(); SfxItemSet aSet( rPool, pWhRanges ); SfxWhichIter aIter( aSet ); @@ -183,18 +185,14 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog( Window* pParent, } // item resources are in svx - USHORT nResId = nSlot - SID_SVX_START + RID_ATTR_BEGIN; + sal_uInt32 nId = aAttrNames.FindIndex( nSlot ); SvLBoxEntry* pEntry = NULL; - ResId aId( nResId, DIALOG_MGR() ); - aId.SetRT( RSC_STRING ); - if ( DIALOG_MGR().IsAvailable( aId ) ) - pEntry = aAttrLB.SvTreeListBox::InsertEntry( CUI_RESSTR( nResId ) ); + if ( RESARRAY_INDEX_NOTFOUND != nId ) + pEntry = aAttrLB.SvTreeListBox::InsertEntry( aAttrNames.GetString(nId) ); else { ByteString sError( "no resource for slot id\nslot = " ); sError += ByteString::CreateFromInt32( nSlot ); - sError += ByteString( "\nresid = " ); - sError += ByteString::CreateFromInt32( nResId ); DBG_ERRORFILE( sError.GetBuffer() ); } -- cgit v1.2.3 From 0de12dba1aa5a192e594a495c84c8b90c96c892b Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 19 Jan 2010 17:27:28 +0100 Subject: #i107450#: some problems with the dialog factory --- cui/source/factory/dlgfact.cxx | 1 - cui/source/factory/dlgfact.hxx | 1 - 2 files changed, 2 deletions(-) diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 083a7d1d0936..6f313e2e2e2b 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -1955,4 +1955,3 @@ SvxAbstractInsRowColDlg* AbstractDialogFactory_Impl::CreateSvxInsRowColDlg( Wind { return new SvxInsRowColDlg( pParent, bCol, nHelpId ); } - diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index daa6cbc9ac0b..c4404568cea1 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -596,7 +596,6 @@ private: //AbstractDialogFactory_Impl implementations class AbstractDialogFactory_Impl : public SvxAbstractDialogFactory { - public: virtual VclAbstractDialog* CreateVclDialog( Window* pParent, sal_uInt32 nResId ); virtual VclAbstractDialog* CreateSfxDialog( Window* pParent, const SfxBindings& rBindings, sal_uInt32 nResId ); -- cgit v1.2.3 From 91bd9fc237e864eceefd41b4cbfab94a1b6379e3 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 2 Feb 2010 23:59:20 +0100 Subject: #i107450#: some fixes for problems found in CAT0 test --- wizards/com/sun/star/wizards/letter/LocaleCodes.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wizards/com/sun/star/wizards/letter/LocaleCodes.java b/wizards/com/sun/star/wizards/letter/LocaleCodes.java index 8e1ddfb34498..3dcf7523d8e7 100644 --- a/wizards/com/sun/star/wizards/letter/LocaleCodes.java +++ b/wizards/com/sun/star/wizards/letter/LocaleCodes.java @@ -45,7 +45,7 @@ public class LocaleCodes extends Resource public LocaleCodes(XMultiServiceFactory xmsf) { super(xmsf, UNIT_NAME, MODULE_NAME); - allLanguageStrings = getStringList(16300); // STR_ARR_SVT_LANGUAGE_TABLE from svtools/source/misc/langtab.src + allLanguageStrings = getStringList(16750); // STR_ARR_SVT_LANGUAGE_TABLE from svtools/source/misc/langtab.src } public String getLanguageString(String MSID) -- cgit v1.2.3