diff options
Diffstat (limited to 'cui/source/inc')
80 files changed, 14373 insertions, 0 deletions
diff --git a/cui/source/inc/ControlFocusHelper.hxx b/cui/source/inc/ControlFocusHelper.hxx new file mode 100644 index 000000000000..4f18f60cd438 --- /dev/null +++ b/cui/source/inc/ControlFocusHelper.hxx @@ -0,0 +1,48 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef SVX_CONTROLL_FUCUS_HELPER_HXX +#define SVX_CONTROLL_FUCUS_HELPER_HXX + +#include <vcl/ctrl.hxx> + +// class SvxControlFocusHelper --------------------------------------------- + +class SvxControlFocusHelper : public Control +{ +private: + Control* m_pFocusCtrl; + +public: + SvxControlFocusHelper( Window* pParent, const ResId& rId ) : + Control( pParent, rId ), m_pFocusCtrl( NULL ) {} + + void SetFocusControl( Control* pCtrl ) { m_pFocusCtrl = pCtrl; } + + virtual long Notify( NotifyEvent& rNEvt ); +}; + +#endif // SVX_CONTROLL_FUCUS_HELPER_HXX diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx new file mode 100644 index 000000000000..8d233b71e890 --- /dev/null +++ b/cui/source/inc/SpellDialog.hxx @@ -0,0 +1,263 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_SPELLDDIALOG_HXX +#define _SVX_SPELLDDIALOG_HXX + +// include --------------------------------------------------------------- + +#include <sfx2/basedlgs.hxx> +#include <vcl/fixed.hxx> +#include <vcl/edit.hxx> +#include <vcl/lstbox.hxx> +#include <svtools/stdctrl.hxx> +#include <vcl/button.hxx> +#include <vcl/menubtn.hxx> +#include <vcl/group.hxx> +#include <vcl/decoview.hxx> +#include <vcl/image.hxx> +#include <com/sun/star/uno/Reference.hxx> + + +#include <svtools/svxbox.hxx> +#include <svx/langbox.hxx> +#include <memory> +#include <svtools/svmedit.hxx> +#include <svl/lstner.hxx> +#include <svtools/xtextedt.hxx> +#include <editeng/SpellPortions.hxx> + +#include <set> + +class ScrollBar; +class TextEngine; +class ExtTextView; +namespace svx{ class SpellUndoAction_Impl;} + +// forward --------------------------------------------------------------- + +struct SpellDialog_Impl; + +namespace com{namespace sun{namespace star{ +namespace linguistic2{ + class XSpellChecker1; +}}}} +namespace svx{ +class SpellDialog; +struct SpellErrorDescription; +// ------------------------------------------------------------------ +class SentenceEditWindow_Impl : public MultiLineEdit/*, public SfxListener*/ +{ + using MultiLineEdit::SetText; + +private: + std::set< USHORT > m_aIgnoreErrorsAt; + USHORT m_nErrorStart; + USHORT m_nErrorEnd; + bool m_bIsUndoEditMode; + + Link m_aModifyLink; + + void CallModifyLink() {m_aModifyLink.Call(this);} + + SpellDialog* GetSpellDialog() const {return (SpellDialog*)GetParent();} +protected: + virtual long PreNotify( NotifyEvent& rNEvt ); + +public: + SentenceEditWindow_Impl( SpellDialog* pParent, const ResId& rResId ); + ~SentenceEditWindow_Impl(); + + void SetModifyHdl(const Link& rLink) { m_aModifyLink = rLink;} + + void SetAttrib( const TextAttrib& rAttr, ULONG nPara, USHORT nStart, USHORT nEnd ); + void SetText( const String& rStr ); + + bool MarkNextError( bool bIgnoreCurrentError ); + void ChangeMarkedWord(const String& rNewWord, LanguageType eLanguage); + void MoveErrorMarkTo(USHORT nErrorStart, USHORT nErrorEnd, bool bGrammar); + String GetErrorText() const; + void RestoreCurrentError(); + + void SetAlternatives( + com::sun::star::uno::Reference<com::sun::star::linguistic2::XSpellAlternatives> ); + + const SpellErrorDescription* GetAlternatives(); + + + void ResetModified() { GetTextEngine()->SetModified(FALSE); m_bIsUndoEditMode = false;} + BOOL IsModified() const { return GetTextEngine()->IsModified(); } + + bool IsUndoEditMode() const { return m_bIsUndoEditMode;} + void SetUndoEditMode(bool bSet); + + svx::SpellPortions CreateSpellPortions( bool bSetIgnoreFlag ) const; + + void ResetUndo(); + void Undo(); + void AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg=FALSE ); + USHORT GetUndoActionCount(); + void UndoActionStart( USHORT nId ); + void UndoActionEnd( USHORT nId ); + + void MoveErrorEnd(long nOffset); + + void ResetIgnoreErrorsAt() { m_aIgnoreErrorsAt.clear(); } +}; + + +// class SvxSpellDialog --------------------------------------------- +class SpellDialogChildWindow; +class ExplainButton : public PushButton +{ + String m_sExplanation; + + virtual void RequestHelp( const HelpEvent& rHEvt ); + virtual void Click(); +public: + ExplainButton( Window* pParent, const ResId& rResId ) : PushButton( pParent, rResId ){} + ~ExplainButton(); + void SetExplanation( const String& rText ) {m_sExplanation = rText;} + bool HasExplanation() { return m_sExplanation.Len() > 0;} + +}; + +class SpellDialog : public SfxModelessDialog +{ + using Window::Invalidate; + + friend class SentenceEditWindow_Impl; +private: + + FixedImage aVendorImageFI; + + FixedText aLanguageFT; + SvxLanguageBox aLanguageLB; + + FixedText aNotInDictFT; + SentenceEditWindow_Impl aSentenceED; + + FixedText aSuggestionFT; + ListBox aSuggestionLB; + + PushButton aIgnorePB; + PushButton aIgnoreAllPB; + PushButton aIgnoreRulePB; + MenuButton aAddToDictMB; + + PushButton aChangePB; + PushButton aChangeAllPB; + ExplainButton aExplainPB; + PushButton aAutoCorrPB; + + CheckBox aCheckGrammarCB; + + HelpButton aHelpPB; + PushButton aOptionsPB; + PushButton aUndoPB; + PushButton aClosePB; + + GroupBox aBackgroundGB; + + Image aVendorImage; + Image aVendorImageHC; + + String aResumeST; + String aIgnoreOnceST; + String aNoSuggestionsST; + + const String m_sTitleSpelling; + const String m_sTitleSpellingGrammar; + const String m_sTitleSpellingGrammarVendor; + + Size aOldWordEDSize; + Link aDialogUndoLink; + + bool bModified; + bool bFocusLocked; + + svx::SpellDialogChildWindow& rParent; + svx::SpellPortions m_aSavedSentence; + + SpellDialog_Impl* pImpl; + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > xSpell; + LanguageType nOldLang; + + DECL_LINK( ChangeHdl, Button * ); + DECL_LINK( ChangeAllHdl, Button * ); + DECL_LINK( IgnoreAllHdl, Button * ); + DECL_LINK( IgnoreHdl, Button * ); + DECL_LINK( CheckGrammarHdl, CheckBox* ); + DECL_LINK( ExtClickHdl, Button * ); + DECL_LINK( CancelHdl, Button * ); + DECL_LINK( ModifyHdl, SentenceEditWindow_Impl *); + DECL_LINK( UndoHdl, Button * ); + DECL_LINK( AddToDictionaryHdl, MenuButton* ); + DECL_LINK( LanguageSelectHdl, SvxLanguageBox* ); + DECL_LINK( DialogUndoHdl, SpellUndoAction_Impl* ); + + DECL_STATIC_LINK( SpellDialog, InitHdl, SpellDialog * ); + + void StartSpellOptDlg_Impl(); + void InitUserDicts(); + void UpdateBoxes_Impl(); + void Init_Impl(); + void SpellContinue_Impl(bool UseSavedSentence = false, bool bIgnoreCurrentError = false ); + void LockFocusChanges( bool bLock ) {bFocusLocked = bLock;} + void Impl_Restore(); + + void SetSelectedLang_Impl( LanguageType nLang ); + LanguageType GetSelectedLang_Impl() const; + + /** Retrieves the next sentence. + */ + bool GetNextSentence_Impl(bool bUseSavedSentence, bool bRechek /*for rechecking the curretn sentence*/); + /** Corrects all errors that have been selected to be changed always + */ + bool ApplyChangeAllList_Impl(SpellPortions& rSentence, bool& bHasReplaced); + void SetTitle_Impl(LanguageType nLang); + +protected: + virtual void Paint( const Rectangle& rRect ); + virtual long Notify( NotifyEvent& rNEvt ); + +public: + SpellDialog( + svx::SpellDialogChildWindow* pChildWindow, + Window * pParent, + SfxBindings* pBindings); + ~SpellDialog(); + + void SetLanguage( sal_uInt16 nLang ); + virtual sal_Bool Close(); + + void InvalidateDialog(); +}; +} //namespace svx + +#endif + diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx new file mode 100644 index 000000000000..aa8224654c65 --- /dev/null +++ b/cui/source/inc/acccfg.hxx @@ -0,0 +1,236 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _ACCCFG_HXX +#define _ACCCFG_HXX + +// #include ***************************************************************** + +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/container/XIndexContainer.hpp> +#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/frame/XModuleManager.hpp> +#include <com/sun/star/ui/XUIConfigurationManager.hpp> +#include <com/sun/star/ui/XAcceleratorConfiguration.hpp> +#include <com/sun/star/frame/XFrame.hpp> +#include <com/sun/star/frame/XStorable.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/lang/XSingleComponentFactory.hpp> +#include <com/sun/star/script/browse/XBrowseNode.hpp> +#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/frame/XFrame.hpp> + +#include <algorithm> + +#include <vcl/fixed.hxx> +#include <vcl/button.hxx> +#include <vcl/dialog.hxx> +#include <vcl/lstbox.hxx> +#include <vcl/group.hxx> +#include <svtools/svtabbx.hxx> +#include <svtools/svtreebx.hxx> +#include <sfx2/tabdlg.hxx> +#include <sfx2/basedlgs.hxx> + +#define _SVSTDARR_STRINGSDTOR +#include <svl/svstdarr.hxx> + +#include <sfx2/minarray.hxx> + +#include "cfgutil.hxx" + +// class SfxAcceleratorConfigListBox ************************************************* + +#define css ::com::sun::star + +class SfxMacroInfoItem; +class SfxConfigGroupListBox_Impl; +class SfxConfigFunctionListBox_Impl; +class SfxAcceleratorConfigPage; + +class SfxAccCfgTabListBox_Impl : public SvTabListBox +{ + SfxAcceleratorConfigPage* m_pAccelConfigPage; + + void KeyInput( const KeyEvent &rKEvt ); + +protected: + virtual void InitEntry( SvLBoxEntry*, const XubString&, const Image&, const Image&, SvLBoxButtonKind eButtonKind ); + +public: + SfxAccCfgTabListBox_Impl( + SfxAcceleratorConfigPage* pAccelConfigPage, + Window *pParent, + const ResId &rResId ) : + SvTabListBox( pParent, rResId ), + m_pAccelConfigPage( pAccelConfigPage ) + {} + + void ReplaceEntry( USHORT nPos, const String &rStr ); +}; + +// class SfxAcceleratorConfigPage ---------------------------------------- + +struct TAccInfo +{ + public: + + TAccInfo( sal_Int32 nKeyPos , + sal_Int32 nListPos, + const KeyCode& aKey ) + : m_nKeyPos (nKeyPos ) + , m_nListPos (nListPos ) + , m_bIsConfigurable(sal_True ) + , m_sCommand ( ) + , m_aKey (aKey ) + // its important to set TRUE as default - + // because only fix entries will be disabled later ... + {} + + sal_Bool isConfigured() const + { + return (m_nKeyPos>-1 && m_nListPos>-1 && m_sCommand.getLength()); + } + + sal_Int32 m_nKeyPos; + sal_Int32 m_nListPos; + sal_Bool m_bIsConfigurable; + ::rtl::OUString m_sCommand; + KeyCode m_aKey; +}; + +namespace sfx2 +{ + class FileDialogHelper; +} + +class SfxAcceleratorConfigPage : public SfxTabPage +{ + friend class SfxAccCfgTabListBox_Impl; +private: + const SfxMacroInfoItem* m_pMacroInfoItem; + const SfxStringItem* m_pStringItem; + const SfxStringItem* m_pFontItem; + sfx2::FileDialogHelper* m_pFileDlg; + + SfxAccCfgTabListBox_Impl aEntriesBox; + FixedLine aKeyboardGroup; + RadioButton aOfficeButton; + RadioButton aModuleButton; + PushButton aChangeButton; + PushButton aRemoveButton; + FixedText aGroupText; + SfxConfigGroupListBox_Impl* pGroupLBox; + FixedText aFunctionText; + SfxConfigFunctionListBox_Impl* pFunctionBox; + FixedText aKeyText; + SvTreeListBox aKeyBox; + FixedLine aFunctionsGroup; + PushButton aLoadButton; + PushButton aSaveButton; + PushButton aResetButton; + String aLoadAccelConfigStr; + String aSaveAccelConfigStr; + String aFilterAllStr; + String aFilterCfgStr; + SfxStylesInfo_Impl m_aStylesInfo; + sal_Bool m_bStylesInfoInitialized; + + css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR; + css::uno::Reference< css::ui::XAcceleratorConfiguration > m_xGlobal; + css::uno::Reference< css::ui::XAcceleratorConfiguration > m_xModule; + css::uno::Reference< css::ui::XAcceleratorConfiguration > m_xAct; + css::uno::Reference< css::container::XNameAccess > m_xUICmdDescription; + css::uno::Reference< css::frame::XFrame > m_xFrame; + + ::rtl::OUString m_sModuleLongName; + ::rtl::OUString m_sModuleShortName; + ::rtl::OUString m_sModuleUIName; + + DECL_LINK( ChangeHdl, Button * ); + DECL_LINK( RemoveHdl, Button * ); + DECL_LINK( SelectHdl, Control * ); + DECL_LINK( Save, Button * ); + DECL_LINK( Load, Button * ); + DECL_LINK( Default, PushButton * ); + DECL_LINK( RadioHdl, RadioButton* ); + + DECL_LINK( LoadHdl, sfx2::FileDialogHelper* ); + DECL_LINK( SaveHdl, sfx2::FileDialogHelper* ); + + String GetLabel4Command(const String& sCommand); + void InitAccCfg(); + USHORT MapKeyCodeToPos( const KeyCode &rCode ) const; + css::uno::Reference< css::frame::XModel > SearchForAlreadyLoadedDoc(const String& sName); + void StartFileDialog( WinBits nBits, const String& rTitle ); + + void Init(const css::uno::Reference< css::ui::XAcceleratorConfiguration >& pAccMgr); + void ResetConfig(); + + void CreateCustomItems( SvLBoxEntry* pEntry, const String& aCol1, const String& aCol2 ); + +public: + SfxAcceleratorConfigPage( Window *pParent, const SfxItemSet& rItemSet ); + virtual ~SfxAcceleratorConfigPage(); + + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet& ); + + void Apply(const css::uno::Reference< css::ui::XAcceleratorConfiguration >& pAccMgr); + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); +}; + + +class SfxAcceleratorConfigListBox : public ListBox +{ + void KeyInput( const KeyEvent &rKEvt ); + +public: + + SfxAcceleratorConfigListBox( Window *pParent, ResId &rResId ) : + ListBox( pParent, rResId ) {} + + void ReplaceEntry( USHORT nPos, const String &rStr ); + void ExpandEntry ( USHORT nPos, const String &rStr ); +}; + +class SvxShortcutAssignDlg : public SfxSingleTabDialog +{ +public: + SvxShortcutAssignDlg( + Window* pParent, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame, + const SfxItemSet& rSet ); + virtual ~SvxShortcutAssignDlg(); +}; + + + +#undef css + +#endif + diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx new file mode 100644 index 000000000000..9766a1b5130f --- /dev/null +++ b/cui/source/inc/align.hxx @@ -0,0 +1,101 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_ALIGN_HXX +#define _SVX_ALIGN_HXX + +// include --------------------------------------------------------------- + +#include <svx/orienthelper.hxx> +#include <vcl/field.hxx> +#include <vcl/imagebtn.hxx> +#include <vcl/fixed.hxx> +#include <vcl/lstbox.hxx> +#include <sfx2/tabdlg.hxx> +#include <svtools/valueset.hxx> +#include <svx/dialcontrol.hxx> +#include <svx/wrapfield.hxx> +#include <svx/frmdirlbox.hxx> + +namespace svx { + +// ============================================================================ + +class AlignmentTabPage : public SfxTabPage +{ + using TabPage::DeactivatePage; + +public: + virtual ~AlignmentTabPage(); + + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); + static USHORT* GetRanges(); + + virtual void Reset( const SfxItemSet& rSet ); + virtual int DeactivatePage( SfxItemSet* pSet ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + +private: + explicit AlignmentTabPage( Window* pParent, const SfxItemSet& rCoreSet ); + + void InitVsRefEgde(); + void UpdateEnableControls(); + + DECL_LINK( UpdateEnableHdl, void* ); + +private: + FixedLine maFlAlignment; + FixedText maFtHorAlign; + ListBox maLbHorAlign; + FixedText maFtIndent; + MetricField maEdIndent; + FixedText maFtVerAlign; + ListBox maLbVerAlign; + + FixedLine maFlOrient; + DialControl maCtrlDial; + FixedText maFtRotate; + WrapField maNfRotate; + FixedText maFtRefEdge; + ValueSet maVsRefEdge; + TriStateBox maCbStacked; + TriStateBox maCbAsianMode; + OrientationHelper maOrientHlp; + + FixedLine maFlProperties; + TriStateBox maBtnWrap; + TriStateBox maBtnHyphen; + TriStateBox maBtnShrink; + FixedText maFtFrameDir; + FrameDirListBox maLbFrameDir; +}; + +// ============================================================================ + +} // namespace svx + +#endif + diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx new file mode 100644 index 000000000000..c2ba66766292 --- /dev/null +++ b/cui/source/inc/autocdlg.hxx @@ -0,0 +1,518 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _OFA_AUTOCDLG_HXX +#define _OFA_AUTOCDLG_HXX + +#include <svtools/langtab.hxx> +#include <sfx2/tabdlg.hxx> +#include <tools/table.hxx> +#include <svx/checklbx.hxx> +#include <vcl/fixed.hxx> +#include <vcl/field.hxx> +#include <vcl/metric.hxx> +#include <svx/langbox.hxx> + +class SvxAutoCorrect; +class CharClass; +class CollatorWrapper; +class SmartTagMgr; + +// class OfaAutoCorrDlg -------------------------------------------------- + +class OfaAutoCorrDlg : public SfxTabDialog +{ + FixedText aLanguageFT; + SvxLanguageBox aLanguageLB; + + DECL_LINK(SelectLanguageHdl, ListBox*); +public: + + OfaAutoCorrDlg(Window* pParent, const SfxItemSet *pSet ); + + void EnableLanguage(BOOL bEnable) + { aLanguageFT.Enable(bEnable); + aLanguageLB.Enable(bEnable);} + +}; + +#ifdef _OFA_AUTOCDLG_CXX +#include <vcl/group.hxx> +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +#include <vcl/lstbox.hxx> +#include <svtools/svtabbx.hxx> +#include <svx/simptabl.hxx> + +class SvStringsISortDtor; + +// class OfaACorrCheckListBox ------------------------------------------ + +class OfaACorrCheckListBox : public SvxSimpleTable +{ + using SvxSimpleTable::SetTabs; + using SvTreeListBox::GetCheckButtonState; + using SvTreeListBox::SetCheckButtonState; + + protected: + virtual void SetTabs(); + virtual void HBarClick(); + virtual void KeyInput( const KeyEvent& rKEvt ); + + public: + OfaACorrCheckListBox(Window* pParent, const ResId& rResId ) : + SvxSimpleTable( pParent, rResId ){} + + inline void *GetUserData(ULONG nPos) { return GetEntry(nPos)->GetUserData(); } + inline void SetUserData(ULONG nPos, void *pData ) { GetEntry(nPos)->SetUserData(pData); } + inline ULONG GetSelectEntryPos() { return GetModel()->GetAbsPos(FirstSelected()); } + + BOOL IsChecked(ULONG nPos, USHORT nCol = 0); + void CheckEntryPos(ULONG nPos, USHORT nCol, BOOL bChecked); + SvButtonState GetCheckButtonState( SvLBoxEntry*, USHORT nCol ) const; + void SetCheckButtonState( SvLBoxEntry*, USHORT nCol, SvButtonState ); +}; + +// class OfaAutocorrOptionsPage ------------------------------------------ + + +class OfaAutocorrOptionsPage : public SfxTabPage +{ + using TabPage::ActivatePage; + +private: + SvxCheckListBox aCheckLB; + + String sInput; + String sDoubleCaps; + String sStartCap; + String sBoldUnderline; + String sURL; + String sNoDblSpaces; + String sDash; + String sNonBrkSpace; + String sFirst; + +public: + OfaAutocorrOptionsPage( Window* pParent, const SfxItemSet& rSet ); + ~OfaAutocorrOptionsPage(); + + static SfxTabPage* Create( Window* pParent, + const SfxItemSet& rAttrSet); + + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + virtual void ActivatePage( const SfxItemSet& ); + +}; + +// class OfaSwAutoFmtOptionsPage ---------------------------------------------------- + +class OfaSwAutoFmtOptionsPage : public SfxTabPage +{ + using TabPage::ActivatePage; + + OfaACorrCheckListBox aCheckLB; + PushButton aEditPB; + FixedText aHeader1Expl; + FixedText aHeader2Expl; + + String sHeader1; + String sHeader2; + + String sDeleteEmptyPara; + String sUseReplaceTbl; + String sCptlSttWord; + String sCptlSttSent; + String sUserStyle; + String sBullet; + String sByInputBullet; + String sBoldUnder; + String sNoDblSpaces; + String sDetectURL; + String sDash; + String sNonBrkSpace; + String sOrdinal; + String sRightMargin; + String sNum; + String sBorder; + String sTable; + String sReplaceTemplates; + String sDelSpaceAtSttEnd; + String sDelSpaceBetweenLines; + + String sMargin; + String sBulletChar; + String sByInputBulletChar; + + Font aBulletFont; + Font aByInputBulletFont; + USHORT nPercent; + + SvLBoxButtonData* pCheckButtonData; + + DECL_LINK(SelectHdl, OfaACorrCheckListBox*); + DECL_LINK(EditHdl, PushButton*); + SvLBoxEntry* CreateEntry(String& rTxt, USHORT nCol); + + + OfaSwAutoFmtOptionsPage( Window* pParent, + const SfxItemSet& rSet ); + ~OfaSwAutoFmtOptionsPage(); + + public: + static SfxTabPage* Create( Window* pParent, + const SfxItemSet& rAttrSet); + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + virtual void ActivatePage( const SfxItemSet& ); +}; + +// class AutoCorrEdit ---------------------------------------------------- + +class AutoCorrEdit : public Edit +{ + Link aActionLink; + BOOL bSpaces; + + public: + AutoCorrEdit(Window* pParent, const ResId& rResId) : + Edit(pParent, rResId), bSpaces(FALSE){} + + void SetActionHdl( const Link& rLink ) + { aActionLink = rLink;} + + void SetSpaces(BOOL bSet) + {bSpaces = bSet;} + + virtual void KeyInput( const KeyEvent& rKEvent ); +}; + +// class OfaAutocorrReplacePage ------------------------------------------ + +class DoubleStringArray; +typedef DoubleStringArray* DoubleStringArrayPtr; +DECLARE_TABLE(DoubleStringTable, DoubleStringArrayPtr) + +class OfaAutocorrReplacePage : public SfxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + +private: + CheckBox aTextOnlyCB; + FixedText aShortFT; + AutoCorrEdit aShortED; + FixedText aReplaceFT; + AutoCorrEdit aReplaceED; + SvTabListBox aReplaceTLB; + PushButton aNewReplacePB; + PushButton aDeleteReplacePB; + + String sModify; + String sNew; + + SvStringsISortDtor* pFormatText; + DoubleStringTable aDoubleStringTable; + CollatorWrapper* pCompareClass; + CollatorWrapper* pCompareCaseClass; + CharClass* pCharClass; + LanguageType eLang; + + BOOL bHasSelectionText; + BOOL bFirstSelect:1; + BOOL bReplaceEditChanged:1; + BOOL bSWriter:1; + + DECL_LINK(SelectHdl, SvTabListBox*); + DECL_LINK(NewDelHdl, PushButton*); + DECL_LINK(ModifyHdl, Edit*); + + void RefillReplaceBox(BOOL bFromReset, //Box mit neuer Sprache fuellen + LanguageType eOldLanguage, + LanguageType eNewLanguage); + +public: + OfaAutocorrReplacePage( Window* pParent, const SfxItemSet& rSet ); + ~OfaAutocorrReplacePage(); + + static SfxTabPage* Create( Window* pParent, + const SfxItemSet& rAttrSet); + + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + virtual void ActivatePage( const SfxItemSet& ); + virtual int DeactivatePage( SfxItemSet* pSet = 0 ); + + void SetLanguage(LanguageType eSet); +}; + +// class OfaAutocorrExceptPage --------------------------------------------- + +struct StringsArrays; +typedef StringsArrays* StringsArraysPtr; +DECLARE_TABLE(StringsTable, StringsArraysPtr) + +class OfaAutocorrExceptPage : public SfxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + +private: + FixedLine aAbbrevFL; + AutoCorrEdit aAbbrevED; + ListBox aAbbrevLB; + PushButton aNewAbbrevPB; + PushButton aDelAbbrevPB; + CheckBox aAutoAbbrevCB; + + FixedLine aDoubleCapsFL; + AutoCorrEdit aDoubleCapsED; + ListBox aDoubleCapsLB; + PushButton aNewDoublePB; + PushButton aDelDoublePB; + CheckBox aAutoCapsCB; + + StringsTable aStringsTable; + CollatorWrapper* pCompareClass; + LanguageType eLang; + + DECL_LINK(NewDelHdl, PushButton*); + DECL_LINK(SelectHdl, ListBox*); + DECL_LINK(ModifyHdl, Edit*); + + void RefillReplaceBoxes(BOOL bFromReset, //Box mit neuer Sprache fuellen + LanguageType eOldLanguage, + LanguageType eNewLanguage); +public: + OfaAutocorrExceptPage( Window* pParent, const SfxItemSet& rSet ); + ~OfaAutocorrExceptPage(); + + static SfxTabPage* Create( Window* pParent, + const SfxItemSet& rAttrSet); + + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + virtual void ActivatePage( const SfxItemSet& ); + virtual int DeactivatePage( SfxItemSet* pSet = 0 ); + void SetLanguage(LanguageType eSet); + +}; + +// class OfaQuoteTabPage ------------------------------------------------- + +class OfaQuoteTabPage : public SfxTabPage +{ + using TabPage::ActivatePage; + +private: + // For anything but writer + SvxCheckListBox aCheckLB; + + // Just for writer + OfaACorrCheckListBox aSwCheckLB; + String sHeader1; + String sHeader2; + + String sNonBrkSpace; + String sOrdinal; + + SvLBoxButtonData* pCheckButtonData; + + FixedLine aSingleFL; + CheckBox aSingleTypoCB; + FixedText aSglStartQuoteFT; + PushButton aSglStartQuotePB; + FixedText aSglStartExFT; + FixedText aSglEndQuoteFT; + PushButton aSglEndQuotePB; + FixedText aSglEndExFT; + PushButton aSglStandardPB; + + FixedLine aDoubleFL; + CheckBox aTypoCB; + FixedText aStartQuoteFT; + PushButton aStartQuotePB; + FixedText aDblStartExFT; + FixedText aEndQuoteFT; + PushButton aEndQuotePB; + FixedText aDblEndExFT; + PushButton aDblStandardPB; + + String sStartQuoteDlg; + String sEndQuoteDlg; + + String sStandard; + + + sal_UCS4 cSglStartQuote; + sal_UCS4 cSglEndQuote; + + sal_UCS4 cStartQuote; + sal_UCS4 cEndQuote; + + DECL_LINK( QuoteHdl, PushButton* ); + DECL_LINK( StdQuoteHdl, PushButton* ); + + String ChangeStringExt_Impl( sal_UCS4 ); + + SvLBoxEntry* CreateEntry(String& rTxt, USHORT nCol); + + OfaQuoteTabPage( Window* pParent, const SfxItemSet& rSet ); +public: + ~OfaQuoteTabPage(); + + static SfxTabPage* Create( Window* pParent, + const SfxItemSet& rAttrSet); + + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + virtual void ActivatePage( const SfxItemSet& ); +}; + +// class OfaAutoCompleteTabPage --------------------------------------------- + +class OfaAutoCompleteTabPage : public SfxTabPage +{ + using TabPage::ActivatePage; + + class AutoCompleteMultiListBox : public MultiListBox + { + OfaAutoCompleteTabPage& rPage; + public: + AutoCompleteMultiListBox( OfaAutoCompleteTabPage& rPg, + const ResId& rResId ) + : MultiListBox( &rPg, rResId ), rPage( rPg ) {} + + virtual long PreNotify( NotifyEvent& rNEvt ); + }; + + CheckBox aCBActiv; //Enable word completion + CheckBox aCBAppendSpace;//Append space + CheckBox aCBAsTip; //Show as tip + + CheckBox aCBCollect;//Collect words + CheckBox aCBRemoveList;//...save the list for later use... + //--removed--CheckBox aCBEndless;// + + FixedText aFTExpandKey; + ListBox aDCBExpandKey; + FixedText aFTMinWordlen; + NumericField aNFMinWordlen; + FixedText aFTMaxEntries; + NumericField aNFMaxEntries; + AutoCompleteMultiListBox aLBEntries; + PushButton aPBEntries; + SvStringsISortDtor* pAutoCmpltList; + USHORT nAutoCmpltListCnt; + + DECL_LINK( CheckHdl, CheckBox* ); + + OfaAutoCompleteTabPage( Window* pParent, + const SfxItemSet& rSet ); +public: + virtual ~OfaAutoCompleteTabPage(); + + static SfxTabPage* Create( Window* pParent, + const SfxItemSet& rAttrSet); + + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + virtual void ActivatePage( const SfxItemSet& ); + + void CopyToClipboard() const; + DECL_LINK( DeleteHdl, PushButton* ); +}; + +// class OfaSmartTagOptionsTabPage --------------------------------------------- + +/** Smart tag options tab page + + This tab page is used to enable/disable smart tag types +*/ +class OfaSmartTagOptionsTabPage : public SfxTabPage +{ + using TabPage::ActivatePage; + +private: + + // controls + CheckBox m_aMainCB; + SvxCheckListBox m_aSmartTagTypesLB; + PushButton m_aPropertiesPB; + FixedText m_aTitleFT; + + // construction via Create() + OfaSmartTagOptionsTabPage( Window* pParent, const SfxItemSet& rSet ); + + /** Inserts items into m_aSmartTagTypesLB + + Reads out the smart tag types supported by the SmartTagMgr and + inserts the associated strings into the list box. + */ + void FillListBox( const SmartTagMgr& rSmartTagMgr ); + + /** Clears the m_aSmartTagTypesLB + */ + void ClearListBox(); + + /** Handler for the check box + + Enables/disables all controls in the tab page (except from the + check box. + */ + DECL_LINK( CheckHdl, CheckBox* ); + + /** Handler for the push button + + Calls the displayPropertyPage function of the smart tag recognizer + associated with the currently selected smart tag type. + */ + DECL_LINK( ClickHdl, PushButton* ); + + /** Handler for the list box + + Enables/disables the properties push button if selection in the + smart tag types list box changes. + */ + DECL_LINK( SelectHdl, SvxCheckListBox* ); + +public: + + virtual ~OfaSmartTagOptionsTabPage(); + + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); + + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + virtual void ActivatePage( const SfxItemSet& ); +}; + +#endif // _OFA_AUTOCDLG_CXX + +#endif // + diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx new file mode 100644 index 000000000000..78e545e5e51a --- /dev/null +++ b/cui/source/inc/backgrnd.hxx @@ -0,0 +1,170 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_BACKGRND_HXX +#define _SVX_BACKGRND_HXX + +// include --------------------------------------------------------------- + +#ifndef _GROUP_HXX //autogen +#include <vcl/group.hxx> +#endif +#include <svtools/stdctrl.hxx> +#ifndef _GRAPH_HXX //autogen +#include <vcl/graph.hxx> +#endif +#include <svtools/valueset.hxx> +#include <svx/dlgctrl.hxx> + +// class SvxBackgroundTabPage -------------------------------------------- +/* +{k:\svx\prototyp\dialog\backgrnd.bmp} + [Beschreibung] + Mit dieser TabPage kann eine Brush (z.B. fuer die Hintergrundfarbe eines + Rahmens) eingestellt werden. + [Items] + <SvxBrushItem>: <SID_ATTR_BRUSH>; +*/ + +//------------------------------------------------------------------------ +// forwards: + +class BackgroundPreviewImpl; +class SvxOpenGraphicDialog; +struct SvxBackgroundTable_Impl; +struct SvxBackgroundPara_Impl; +struct SvxBackgroundPage_Impl; +class SvxBrushItem; +//------------------------------------------------------------------------ + +class SvxBackgroundTabPage : public SvxTabPage +{ + using TabPage::DeactivatePage; +public: + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + virtual void FillUserData(); + virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); + + void ShowSelector(); // Umschalt-ListBox aktivieren + void ShowTblControl(); // fuer den Writer (Zellen/Zeilen/Tabelle) + void ShowParaControl(BOOL bCharOnly = FALSE); // fuer den Writer (Absatz/Zeichen) + void EnableTransparency(BOOL bColor, BOOL bGraphic); + virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001 +protected: + virtual int DeactivatePage( SfxItemSet* pSet = 0 ); + +private: + SvxBackgroundTabPage( Window* pParent, const SfxItemSet& rCoreSet ); + ~SvxBackgroundTabPage(); + + // Hintergrundfarbe ------------------------------------ + Control aBorderWin; + ValueSet aBackgroundColorSet; + FixedLine aBackgroundColorBox; + BackgroundPreviewImpl* pPreviewWin1; + //color transparency + FixedText aColTransFT; + MetricField aColTransMF; + // Hintergrund-Bitmap ---------------------------------- + PushButton aBtnBrowse; + CheckBox aBtnLink; + CheckBox aBtnPreview; + FixedInfo aFtFile; + FixedLine aGbFile; + RadioButton aBtnPosition; + RadioButton aBtnArea; + RadioButton aBtnTile; + SvxRectCtl aWndPosition; + FixedLine aGbPosition; + //transparency of graphics + FixedLine aGraphTransFL; + MetricField aGraphTransMF; + + BackgroundPreviewImpl* pPreviewWin2; + // Selektor -------------------------------------------- + FixedText aSelectTxt; + ListBox aLbSelect; + const String aStrBrowse; + const String aStrUnlinked; + + // DDListBox fuer Writer ------------------------------- + + FixedText aTblDesc; + ListBox aTblLBox; + ListBox aParaLBox; + + //------------------------------------------------------ + Color aBgdColor; + USHORT nHtmlMode; + BOOL bAllowShowSelector : 1; + BOOL bIsGraphicValid : 1; + BOOL bLinkOnly : 1; + BOOL bResized : 1; + BOOL bColTransparency : 1; + BOOL bGraphTransparency : 1; + Graphic aBgdGraphic; + String aBgdGraphicPath; + String aBgdGraphicFilter; + + SvxBackgroundPage_Impl* pPageImpl; + SvxOpenGraphicDialog* pImportDlg; + + // Items fuer Sw-Tabelle muessen gesammelt werden + SvxBackgroundTable_Impl* pTableBck_Impl; + // auch fuer die Absatzvorlage + SvxBackgroundPara_Impl* pParaBck_Impl; + +#ifdef _SVX_BACKGRND_CXX + void FillColorValueSets_Impl(); + void ShowColorUI_Impl(); + void ShowBitmapUI_Impl(); + BOOL LoadLinkedGraphic_Impl(); + void RaiseLoadError_Impl(); + void SetGraphicPosition_Impl( SvxGraphicPosition ePos ); + SvxGraphicPosition GetGraphicPosition_Impl(); + void FillControls_Impl(const SvxBrushItem& rBgdAttr, + const String& rUserData); + BOOL FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, USHORT nSlot); + void ResetFromWallpaperItem( const SfxItemSet& rSet ); + + DECL_LINK( LoadTimerHdl_Impl, Timer* ); + DECL_LINK( SelectHdl_Impl, ListBox* ); + DECL_LINK( BrowseHdl_Impl, PushButton* ); + DECL_LINK( RadioClickHdl_Impl, RadioButton* ); + DECL_LINK( FileClickHdl_Impl, CheckBox* ); + DECL_LINK( BackgroundColorHdl_Impl, ValueSet* ); + DECL_LINK( TblDestinationHdl_Impl, ListBox* ); + DECL_LINK( ParaDestinationHdl_Impl, ListBox* ); +#endif +}; + +#endif // #ifndef _SVX_BACKGRND_HXX + + diff --git a/cui/source/inc/bbdlg.hxx b/cui/source/inc/bbdlg.hxx new file mode 100644 index 000000000000..249c9c427485 --- /dev/null +++ b/cui/source/inc/bbdlg.hxx @@ -0,0 +1,56 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_BBDLG_HXX +#define _SVX_BBDLG_HXX + +// include --------------------------------------------------------------- + +#include <sfx2/tabdlg.hxx> + +/*-------------------------------------------------------------------- + Beschreibung: Border Background Pages buendeln + --------------------------------------------------------------------*/ + +class SvxBorderBackgroundDlg: public SfxTabDialog +{ +public: + SvxBorderBackgroundDlg( Window *pParent, + const SfxItemSet& rCoreSet, + BOOL bEnableSelector = FALSE ); + + ~SvxBorderBackgroundDlg(); + +protected: + virtual void PageCreated( USHORT nPageId, SfxTabPage& rTabPage ); + +private: + BOOL bEnableBackgroundSelector; // fuer Border/Background-Dlg +}; + + +#endif + diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx new file mode 100644 index 000000000000..33ea94ff4478 --- /dev/null +++ b/cui/source/inc/border.hxx @@ -0,0 +1,156 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_BORDER_HXX +#define _SVX_BORDER_HXX + +// include --------------------------------------------------------------- + + +#include <svtools/ctrlbox.hxx> +#include <vcl/group.hxx> +#include <vcl/field.hxx> +#include <vcl/fixed.hxx> +#include <svtools/valueset.hxx> +#include <sfx2/tabdlg.hxx> +#include <svx/frmsel.hxx> + +// forward --------------------------------------------------------------- + +class SvxBorderLine; +class XColorTable; + +#include <svx/flagsdef.hxx> + +class SvxBorderTabPage : public SfxTabPage +{ + using TabPage::DeactivatePage; + +public: + static SfxTabPage* Create( Window* pParent, + const SfxItemSet& rAttrSet); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& rCoreAttrs ); + virtual void Reset( const SfxItemSet& ); + + void HideShadowControls(); + virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001 +protected: + virtual int DeactivatePage( SfxItemSet* pSet = 0 ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + +private: + SvxBorderTabPage( Window* pParent, const SfxItemSet& rCoreAttrs ); + ~SvxBorderTabPage(); + + // Controls + FixedLine aFlBorder; + FixedText aDefaultFT; + ValueSet aWndPresets; + FixedText aUserDefFT; + svx::FrameSelector aFrameSel; + + FixedLine aFlSep1; + FixedLine aFlLine; + FixedText aStyleFT; + LineListBox aLbLineStyle; + FixedText aColorFT; + ColorListBox aLbLineColor; + + FixedLine aFlSep2; + FixedLine aDistanceFL; + FixedText aLeftFT; + MetricField aLeftMF; + FixedText aRightFT; + MetricField aRightMF; + FixedText aTopFT; + MetricField aTopMF; + FixedText aBottomFT; + MetricField aBottomMF; + CheckBox aSynchronizeCB; + + FixedLine aFlShadow; + FixedText aFtShadowPos; + ValueSet aWndShadows; + FixedText aFtShadowSize; + MetricField aEdShadowSize; + FixedText aFtShadowColor; + ColorListBox aLbShadowColor; + + //properties - "Merge with next paragraph" in Writer + FixedLine aPropertiesFL; + CheckBox aMergeWithNextCB; + // --> collapsing table borders FME 2005-05-27 #i29550# + CheckBox aMergeAdjacentBordersCB; + // <-- + + ImageList aShadowImgLstH; + ImageList aShadowImgLst; + ImageList aBorderImgLstH; + ImageList aBorderImgLst; + + long nMinValue; // minimum distance + int nSWMode; // table, textframe, paragraph + + bool mbHorEnabled; /// true = Inner horizontal border enabled. + bool mbVerEnabled; /// true = Inner vertical border enabled. + bool mbTLBREnabled; /// true = Top-left to bottom-right border enabled. + bool mbBLTREnabled; /// true = Bottom-left to top-right border enabled. + bool mbUseMarginItem; + + static BOOL bSync; + +#ifdef _SVX_BORDER_CXX + // Handler + DECL_LINK( SelStyleHdl_Impl, ListBox* pLb ); + DECL_LINK( SelColHdl_Impl, ListBox* pLb ); + DECL_LINK( SelPreHdl_Impl, void* ); + DECL_LINK( SelSdwHdl_Impl, void* ); + DECL_LINK( LinesChanged_Impl, void* ); + DECL_LINK( ModifyDistanceHdl_Impl, MetricField*); + DECL_LINK( SyncHdl_Impl, CheckBox*); + + USHORT GetPresetImageId( USHORT nValueSetIdx ) const; + USHORT GetPresetStringId( USHORT nValueSetIdx ) const; + + void FillPresetVS(); + void FillShadowVS(); + void FillValueSets(); + + // Filler + void FillLineListBox_Impl(); + + // Setzen von einzelnen Frame-/Core-Linien + void ResetFrameLine_Impl( svx::FrameBorderType eBorder, + const SvxBorderLine* pCurLine, + bool bValid ); +#endif +}; + + +#endif + diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx new file mode 100644 index 000000000000..8d63c5f8dd49 --- /dev/null +++ b/cui/source/inc/cfg.hxx @@ -0,0 +1,819 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVXCFG_HXX +#define _SVXCFG_HXX + +#include <vcl/lstbox.hxx> +#include <vcl/toolbox.hxx> +#include <vcl/fixed.hxx> +#include <vcl/group.hxx> +#include <vcl/menubtn.hxx> +#include <vcl/toolbox.hxx> +#include <svtools/svtreebx.hxx> +#include <svtools/svmedit2.hxx> +#include <svtools/svmedit.hxx> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/container/XIndexContainer.hpp> +#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/frame/XModuleManager.hpp> +#include <com/sun/star/ui/XUIConfigurationListener.hpp> +#include <com/sun/star/ui/XUIConfigurationManager.hpp> +#include <com/sun/star/ui/XImageManager.hpp> +#include <com/sun/star/graphic/XGraphicProvider.hpp> +#include <com/sun/star/frame/XFrame.hpp> +#include <com/sun/star/frame/XStorable.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/lang/XSingleComponentFactory.hpp> + +#define _SVSTDARR_USHORTS +#define _SVSTDARR_STRINGSDTOR +#include <svl/svstdarr.hxx> // SvUShorts +#include <sfx2/minarray.hxx> +#include <sfx2/tabdlg.hxx> +#include <vector> +#include <vcl/msgbox.hxx> + +#include "selector.hxx" + +class SvxConfigEntry; +class SvxConfigPage; +class SvxMenuConfigPage; +class SvxToolbarConfigPage; + +typedef std::vector< SvxConfigEntry* > SvxEntries; + +class SvxConfigDialog : public SfxTabDialog +{ +private: + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame; + +public: + SvxConfigDialog( Window*, const SfxItemSet* ); + ~SvxConfigDialog(); + + virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual short Ok(); + + void SetFrame(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame); +}; + +class SaveInData : public ImageProvider +{ +private: + + bool bModified; + + bool bDocConfig; + bool bReadOnly; + + ::com::sun::star::uno::Reference + < com::sun::star::ui::XUIConfigurationManager > m_xCfgMgr; + + ::com::sun::star::uno::Reference + < com::sun::star::ui::XUIConfigurationManager > m_xParentCfgMgr; + + ::com::sun::star::uno::Reference + < com::sun::star::ui::XImageManager > m_xImgMgr; + + ::com::sun::star::uno::Reference + < com::sun::star::ui::XImageManager > m_xParentImgMgr; + + static ::com::sun::star::uno::Reference + < com::sun::star::ui::XImageManager >* xDefaultImgMgr; + +public: + + SaveInData( + const ::com::sun::star::uno::Reference < + ::com::sun::star::ui::XUIConfigurationManager >& xCfgMgr, + const ::com::sun::star::uno::Reference < + ::com::sun::star::ui::XUIConfigurationManager >& xParentCfgMgr, + const rtl::OUString& aModuleId, + bool docConfig ); + + ~SaveInData() {} + + bool PersistChanges( + const com::sun::star::uno::Reference + < com::sun::star::uno::XInterface >& xManager ); + + void SetModified( bool bValue = TRUE ) { bModified = bValue; } + bool IsModified( ) { return bModified; } + + bool IsReadOnly( ) { return bReadOnly; } + bool IsDocConfig( ) { return bDocConfig; } + + ::com::sun::star::uno::Reference + < ::com::sun::star::ui::XUIConfigurationManager > + GetConfigManager() { return m_xCfgMgr; }; + + ::com::sun::star::uno::Reference + < ::com::sun::star::ui::XUIConfigurationManager > + GetParentConfigManager() { return m_xParentCfgMgr; }; + + ::com::sun::star::uno::Reference + < ::com::sun::star::ui::XImageManager > + GetImageManager() { return m_xImgMgr; }; + + ::com::sun::star::uno::Reference + < ::com::sun::star::ui::XImageManager > + GetParentImageManager() { return m_xParentImgMgr; }; + + ::com::sun::star::uno::Reference + < com::sun::star::lang::XMultiServiceFactory > m_xServiceManager; + + ::com::sun::star::uno::Reference + < com::sun::star::container::XNameAccess > m_xCommandToLabelMap; + + com::sun::star::uno::Reference + < com::sun::star::uno::XComponentContext > m_xComponentContext; + + com::sun::star::uno::Sequence + < com::sun::star::beans::PropertyValue > m_aSeparatorSeq; + + Image GetImage( const rtl::OUString& rCommandURL ); + + virtual bool HasURL( const rtl::OUString& aURL ) = 0; + virtual bool HasSettings() = 0; + virtual SvxEntries* GetEntries() = 0; + virtual void SetEntries( SvxEntries* ) = 0; + virtual void Reset() = 0; + virtual bool Apply() = 0; +}; + +class MenuSaveInData : public SaveInData +{ +private: + + rtl::OUString m_aMenuResourceURL; + rtl::OUString m_aDescriptorContainer; + + ::com::sun::star::uno::Reference + < com::sun::star::container::XIndexAccess > m_xMenuSettings; + + SvxConfigEntry* pRootEntry; + + // static holder of the default menu data + static MenuSaveInData* pDefaultData; + + static void SetDefaultData( MenuSaveInData* pData ) {pDefaultData = pData;} + static MenuSaveInData* GetDefaultData() { return pDefaultData; } + + void Apply( bool bDefault ); + + void Apply( + SvxConfigEntry* pRootEntry, + com::sun::star::uno::Reference< + com::sun::star::container::XIndexContainer >& rNewMenuBar, + com::sun::star::uno::Reference< + com::sun::star::lang::XSingleComponentFactory >& rFactory, + SvLBoxEntry *pParent = NULL ); + + void ApplyMenu( + com::sun::star::uno::Reference< + com::sun::star::container::XIndexContainer >& rNewMenuBar, + com::sun::star::uno::Reference< + com::sun::star::lang::XSingleComponentFactory >& rFactory, + SvxConfigEntry *pMenuData = NULL ); + + bool LoadSubMenus( + const ::com::sun::star::uno::Reference< + com::sun::star::container::XIndexAccess >& xMenuBarSettings, + const rtl::OUString& rBaseTitle, SvxConfigEntry* pParentData ); + +public: + + MenuSaveInData( + const ::com::sun::star::uno::Reference < + ::com::sun::star::ui::XUIConfigurationManager >&, + const ::com::sun::star::uno::Reference < + ::com::sun::star::ui::XUIConfigurationManager >&, + const rtl::OUString& aModuleId, + bool docConfig ); + + ~MenuSaveInData(); + + // methods inherited from SaveInData + SvxEntries* GetEntries(); + void SetEntries( SvxEntries* ); + bool HasURL( const rtl::OUString& URL ) { (void)URL; return FALSE; } + bool HasSettings() { return m_xMenuSettings.is(); } + void Reset(); + bool Apply(); +}; + +class SvxConfigEntry +{ +private: + + // common properties + USHORT nId; + ::rtl::OUString aHelpText; + ::rtl::OUString aLabel; + ::rtl::OUString aCommand; + ::rtl::OUString aHelpURL; + + bool bPopUp; + bool bStrEdited; + bool bIsUserDefined; + bool bIsMain; + bool bIsDeletable; + bool bIsMovable; + bool bIsParentData; + + // toolbar specific properties + bool bIsVisible; + sal_Int32 nStyle; + + ::com::sun::star::uno::Reference< + ::com::sun::star::graphic::XGraphic > xBackupGraphic; + + SvxEntries *pEntries; + +public: + + SvxConfigEntry( const ::rtl::OUString& rDisplayName, + const ::rtl::OUString& rCommandURL, + bool bPopup = FALSE, + bool bParentData = FALSE ); + + SvxConfigEntry() + : + nId( 0 ), + bPopUp( FALSE ), + bStrEdited( FALSE ), + bIsUserDefined( FALSE ), + bIsMain( FALSE ), + bIsParentData( FALSE ), + bIsVisible( TRUE ), + nStyle( 0 ), + pEntries( 0 ) + {} + + ~SvxConfigEntry(); + + const ::rtl::OUString& GetCommand() const { return aCommand; } + void SetCommand( const String& rCmd ) { aCommand = rCmd; } + + const ::rtl::OUString& GetName() const { return aLabel; } + void SetName( const String& rStr ) { aLabel = rStr; bStrEdited = TRUE; } + bool HasChangedName() const { return bStrEdited; } + + const ::rtl::OUString& GetHelpText() ; + void SetHelpText( const String& rStr ) { aHelpText = rStr; } + + const ::rtl::OUString& GetHelpURL() const { return aHelpURL; } + void SetHelpURL( const String& rStr ) { aHelpURL = rStr; } + + void SetPopup( bool bOn = TRUE ) { bPopUp = bOn; } + bool IsPopup() const { return bPopUp; } + + void SetUserDefined( bool bOn = TRUE ) { bIsUserDefined = bOn; } + bool IsUserDefined() const { return bIsUserDefined; } + + bool IsBinding() const { return !bPopUp; } + bool IsSeparator() const { return nId == 0; } + + SvxEntries* GetEntries() const { return pEntries; } + void SetEntries( SvxEntries* entries ) { pEntries = entries; } + bool HasEntries() const { return pEntries != NULL; } + + void SetMain( bool bValue = TRUE ) { bIsMain = bValue; } + bool IsMain() { return bIsMain; } + + void SetParentData( bool bValue = TRUE ) { bIsParentData = bValue; } + bool IsParentData() { return bIsParentData; } + + bool IsMovable(); + bool IsDeletable(); + bool IsRenamable(); + + void SetVisible( bool b ) { bIsVisible = b; } + bool IsVisible() const { return bIsVisible; } + + void SetBackupGraphic( + ::com::sun::star::uno::Reference< + ::com::sun::star::graphic::XGraphic > graphic ) + { xBackupGraphic = graphic; } + + ::com::sun::star::uno::Reference< + ::com::sun::star::graphic::XGraphic > + GetBackupGraphic() + { return xBackupGraphic; } + + bool IsIconModified() { return xBackupGraphic.is(); } + + sal_Int32 GetStyle() { return nStyle; } + void SetStyle( sal_Int32 style ) { nStyle = style; } +}; + +class SvxMenuEntriesListBox : public SvTreeListBox +{ +private: + SvxConfigPage* pPage; + +protected: + bool m_bIsInternalDrag; + +public: + SvxMenuEntriesListBox( Window*, const ResId& ); + ~SvxMenuEntriesListBox(); + + virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ); + + virtual BOOL NotifyAcceptDrop( SvLBoxEntry* pEntry ); + + virtual BOOL NotifyMoving( SvLBoxEntry*, SvLBoxEntry*, + SvLBoxEntry*&, ULONG& ); + + virtual BOOL NotifyCopying( SvLBoxEntry*, SvLBoxEntry*, + SvLBoxEntry*&, ULONG&); + + virtual DragDropMode NotifyStartDrag( + TransferDataContainer&, SvLBoxEntry* ); + + virtual void DragFinished( sal_Int8 ); + + void KeyInput( const KeyEvent& rKeyEvent ); +}; + +class SvxDescriptionEdit : public ExtMultiLineEdit +{ +private: + Rectangle m_aRealRect; + +public: + SvxDescriptionEdit( Window* pParent, const ResId& _rId ); + inline ~SvxDescriptionEdit() {} + + void SetNewText( const String& _rText ); + inline void Clear() { SetNewText( String() ); } +}; + +class SvxConfigPage : public SfxTabPage +{ +private: + + bool bInitialised; + SaveInData* pCurrentSaveInData; + + DECL_LINK( SelectSaveInLocation, ListBox * ); + DECL_LINK( AsyncInfoMsg, String* ); + + bool SwapEntryData( SvLBoxEntry* pSourceEntry, SvLBoxEntry* pTargetEntry ); + void AlignControls(); + +protected: + + // the top section of the tab page where top level menus and toolbars + // are displayed in a listbox + FixedLine aTopLevelSeparator; + FixedText aTopLevelLabel; + ListBox aTopLevelListBox; + PushButton aNewTopLevelButton; + MenuButton aModifyTopLevelButton; + + // the contents section where the contents of the selected + // menu or toolbar are displayed + FixedLine aContentsSeparator; + FixedText aContentsLabel; + SvTreeListBox* aContentsListBox; + + PushButton aAddCommandsButton; + MenuButton aModifyCommandButton; + + ImageButton aMoveUpButton; + ImageButton aMoveDownButton; + + FixedText aSaveInText; + ListBox aSaveInListBox; + + FixedText aDescriptionLabel; + SvxDescriptionEdit aDescriptionField; + + SvxScriptSelectorDialog* pSelectorDlg; + + // the ResourceURL to select when opening the dialog + rtl::OUString m_aURLToSelect; + + ::com::sun::star::uno::Reference + < ::com::sun::star::frame::XFrame > m_xFrame; + + SvxConfigPage( Window*, /* const ResId&, */ const SfxItemSet& ); + virtual ~SvxConfigPage(); + + DECL_LINK( MoveHdl, Button * ); + + virtual SaveInData* CreateSaveInData( + const ::com::sun::star::uno::Reference < + ::com::sun::star::ui::XUIConfigurationManager >&, + const ::com::sun::star::uno::Reference < + ::com::sun::star::ui::XUIConfigurationManager >&, + const rtl::OUString& aModuleId, + bool docConfig ) = 0; + + virtual void Init() = 0; + virtual void UpdateButtonStates() = 0; + virtual short QueryReset() = 0; + + void PositionContentsListBox(); + + SvLBoxEntry* InsertEntry( SvxConfigEntry* pNewEntryData, + SvLBoxEntry* pTarget = NULL, + bool bFront = FALSE ); + + void AddSubMenusToUI( const String& rBaseTitle, + SvxConfigEntry* pParentData ); + + SvLBoxEntry* InsertEntryIntoUI ( SvxConfigEntry* pNewEntryData, + ULONG nPos = LIST_APPEND ); + + SvxEntries* FindParentForChild( SvxEntries* pParentEntries, + SvxConfigEntry* pChildData ); + + void ReloadTopLevelListBox( SvxConfigEntry* pSelection = NULL ); + +public: + + static bool CanConfig( const ::rtl::OUString& rModuleId ); + + SaveInData* GetSaveInData() { return pCurrentSaveInData; } + + SvLBoxEntry* AddFunction( SvLBoxEntry* pTarget = NULL, + bool bFront = FALSE, + bool bAllowDuplicates = FALSE ); + + virtual void MoveEntry( bool bMoveUp ); + + bool MoveEntryData( SvLBoxEntry* pSourceEntry, + SvLBoxEntry* pTargetEntry ); + + BOOL FillItemSet( SfxItemSet& ); + void Reset( const SfxItemSet& ); + + virtual bool DeleteSelectedContent() = 0; + virtual void DeleteSelectedTopLevel() = 0; + + SvxConfigEntry* GetTopLevelSelection() + { + return (SvxConfigEntry*) aTopLevelListBox.GetEntryData( + aTopLevelListBox.GetSelectEntryPos() ); + } + + /** identifies the module in the given frame. If the frame is <NULL/>, a default + frame will be determined beforehand. + + If the given frame is <NULL/>, a default frame will be used: The method the active + frame of the desktop, then the current frame. If both are <NULL/>, + the SfxViewFrame::Current's XFrame is used. If this is <NULL/>, too, an empty string is returned. + + If the given frame is not <NULL/>, or an default frame could be successfully determined, then + the ModuleManager is asked for the module ID of the component in the frame. + */ + static ::rtl::OUString + GetFrameWithDefaultAndIdentify( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _inout_rxFrame ); +}; + +class SvxMenuConfigPage : public SvxConfigPage +{ +private: + + DECL_LINK( SelectMenu, ListBox * ); + DECL_LINK( SelectMenuEntry, Control * ); + DECL_LINK( NewMenuHdl, Button * ); + DECL_LINK( MenuSelectHdl, MenuButton * ); + DECL_LINK( EntrySelectHdl, MenuButton * ); + DECL_LINK( AddCommandsHdl, Button * ); + DECL_LINK( AddFunctionHdl, SvxScriptSelectorDialog * ); + + void Init(); + void UpdateButtonStates(); + short QueryReset(); + bool DeleteSelectedContent(); + void DeleteSelectedTopLevel(); + +public: + SvxMenuConfigPage( Window *pParent, const SfxItemSet& rItemSet ); + ~SvxMenuConfigPage(); + + SaveInData* CreateSaveInData( + const ::com::sun::star::uno::Reference < + ::com::sun::star::ui::XUIConfigurationManager >&, + const ::com::sun::star::uno::Reference < + ::com::sun::star::ui::XUIConfigurationManager >&, + const rtl::OUString& aModuleId, + bool docConfig ); +}; + +class SvxMainMenuOrganizerDialog : public ModalDialog +{ + FixedText aMenuNameText; + Edit aMenuNameEdit; + FixedText aMenuListText; + SvTreeListBox aMenuListBox; + ImageButton aMoveUpButton; + ImageButton aMoveDownButton; + OKButton aOKButton; + CancelButton aCloseButton; + HelpButton aHelpButton; + + SvxEntries* pEntries; + SvLBoxEntry* pNewMenuEntry; + bool bModified; + + void UpdateButtonStates(); + + DECL_LINK( MoveHdl, Button * ); + DECL_LINK( ModifyHdl, Edit * ); + DECL_LINK( SelectHdl, Control* ); + +public: + SvxMainMenuOrganizerDialog ( + Window*, SvxEntries*, + SvxConfigEntry*, bool bCreateMenu = FALSE ); + + ~SvxMainMenuOrganizerDialog (); + + SvxEntries* GetEntries(); + void SetEntries( SvxEntries* ); + SvxConfigEntry* GetSelectedEntry(); +}; + +class SvxToolbarEntriesListBox : public SvxMenuEntriesListBox +{ + Size m_aCheckBoxImageSizePixel; + Link m_aChangedListener; + SvLBoxButtonData* m_pButtonData; + BOOL m_bHiContrastMode; + SvxConfigPage* pPage; + + void ChangeVisibility( SvLBoxEntry* pEntry ); + +protected: + + virtual void CheckButtonHdl(); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + void BuildCheckBoxButtonImages( SvLBoxButtonData* ); + Image GetSizedImage( + VirtualDevice& aDev, const Size& aNewSize, const Image& aImage ); + +public: + + SvxToolbarEntriesListBox( + Window* pParent, const ResId& ); + + ~SvxToolbarEntriesListBox(); + + void SetChangedListener( const Link& aChangedListener ) + { m_aChangedListener = aChangedListener; } + + const Link& GetChangedListener() const { return m_aChangedListener; } + + Size GetCheckBoxPixelSize() const + { return m_aCheckBoxImageSizePixel; } + + virtual BOOL NotifyMoving( + SvLBoxEntry*, SvLBoxEntry*, SvLBoxEntry*&, ULONG& ); + + virtual BOOL NotifyCopying( + SvLBoxEntry*, SvLBoxEntry*, SvLBoxEntry*&, ULONG&); + + void KeyInput( const KeyEvent& rKeyEvent ); +}; + +class SvxToolbarConfigPage : public SvxConfigPage +{ +private: + + DECL_LINK( SelectToolbar, ListBox * ); + DECL_LINK( SelectToolbarEntry, Control * ); + DECL_LINK( ToolbarSelectHdl, MenuButton * ); + DECL_LINK( EntrySelectHdl, MenuButton * ); + DECL_LINK( NewToolbarHdl, Button * ); + DECL_LINK( AddCommandsHdl, Button * ); + DECL_LINK( AddFunctionHdl, SvxScriptSelectorDialog * ); + DECL_LINK( MoveHdl, Button * ); + + void UpdateButtonStates(); + short QueryReset(); + void Init(); + bool DeleteSelectedContent(); + void DeleteSelectedTopLevel(); + +public: + SvxToolbarConfigPage( Window *pParent, const SfxItemSet& rItemSet ); + ~SvxToolbarConfigPage(); + + SvLBoxEntry* AddFunction( SvLBoxEntry* pTarget = NULL, + bool bFront = FALSE, + bool bAllowDuplicates = TRUE ); + + void MoveEntry( bool bMoveUp ); + + SaveInData* CreateSaveInData( + const ::com::sun::star::uno::Reference < + ::com::sun::star::ui::XUIConfigurationManager >&, + const ::com::sun::star::uno::Reference < + ::com::sun::star::ui::XUIConfigurationManager >&, + const rtl::OUString& aModuleId, + bool docConfig ); +}; + +class ToolbarSaveInData : public SaveInData +{ +private: + + SvxConfigEntry* pRootEntry; + rtl::OUString m_aDescriptorContainer; + + ::com::sun::star::uno::Reference + < com::sun::star::container::XNameAccess > m_xPersistentWindowState; + + bool LoadToolbar( + const ::com::sun::star::uno::Reference< + com::sun::star::container::XIndexAccess >& xToolBarSettings, + SvxConfigEntry* pParentData ); + + void ApplyToolbar( + com::sun::star::uno::Reference< + com::sun::star::container::XIndexContainer >& rNewToolbarBar, + com::sun::star::uno::Reference< + com::sun::star::lang::XSingleComponentFactory >& rFactory, + SvxConfigEntry *pToolbar = NULL ); + +public: + + ToolbarSaveInData( + const ::com::sun::star::uno::Reference < + ::com::sun::star::ui::XUIConfigurationManager >&, + const ::com::sun::star::uno::Reference < + ::com::sun::star::ui::XUIConfigurationManager >&, + const rtl::OUString& aModuleId, + bool docConfig ); + + ~ToolbarSaveInData(); + + void CreateToolbar( SvxConfigEntry* pToolbar ); + void RestoreToolbar( SvxConfigEntry* pToolbar ); + void RemoveToolbar( SvxConfigEntry* pToolbar ); + void ApplyToolbar( SvxConfigEntry* pToolbar ); + + rtl::OUString GetSystemUIName( const rtl::OUString& rResourceURL ); + + sal_Int32 GetSystemStyle( const rtl::OUString& rResourceURL ); + + void SetSystemStyle( + const rtl::OUString& rResourceURL, sal_Int32 nStyle ); + + void SetSystemStyle( + ::com::sun::star::uno::Reference + < ::com::sun::star::frame::XFrame > xFrame, + const rtl::OUString& rResourceURL, sal_Int32 nStyle ); + + SvxEntries* GetEntries(); + void SetEntries( SvxEntries* ); + bool HasSettings(); + bool HasURL( const rtl::OUString& rURL ); + void Reset(); + bool Apply(); +}; + +class SvxNewToolbarDialog : public ModalDialog +{ +private: + FixedText aFtDescription; + Edit aEdtName; + FixedText aSaveInText; + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; + + Link aCheckNameHdl; + + DECL_LINK(ModifyHdl, Edit*); + +public: + SvxNewToolbarDialog( Window* pWindow, const String& rName ); + + ListBox aSaveInListBox; + + void GetName( rtl::OUString& rName ){rName = aEdtName.GetText();} + + void SetCheckNameHdl( const Link& rLink, bool bCheckImmediately = false ) + { + aCheckNameHdl = rLink; + if ( bCheckImmediately ) + aBtnOK.Enable( rLink.Call( this ) > 0 ); + } + + void SetEditHelpId( const rtl::OString& aHelpId) {aEdtName.SetHelpId(aHelpId);} +}; + +class SvxIconSelectorDialog : public ModalDialog +{ +private: + FixedText aFtDescription; + ToolBox aTbSymbol; + FixedText aFtNote; + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; + PushButton aBtnImport; + PushButton aBtnDelete; + FixedLine aFlSeparator; + sal_uInt16 m_nNextId; + + sal_Int32 m_nExpectedSize; + + ::com::sun::star::uno::Reference< + ::com::sun::star::ui::XImageManager > m_xImageManager; + + ::com::sun::star::uno::Reference< + ::com::sun::star::ui::XImageManager > m_xParentImageManager; + + ::com::sun::star::uno::Reference< + ::com::sun::star::ui::XImageManager > m_xImportedImageManager; + + ::com::sun::star::uno::Reference< + ::com::sun::star::graphic::XGraphicProvider > m_xGraphProvider; + + bool ReplaceGraphicItem( const ::rtl::OUString& aURL ); + + bool ImportGraphic( const ::rtl::OUString& aURL ); + + void ImportGraphics( + const com::sun::star::uno::Sequence< rtl::OUString >& aURLs ); + + BitmapEx AutoScaleBitmap(BitmapEx & aBitmap, const long aStandardSize);// Added by shizhoubo + +public: + + SvxIconSelectorDialog( + Window *pWindow, + const ::com::sun::star::uno::Reference< + ::com::sun::star::ui::XImageManager >& rXImageManager, + const ::com::sun::star::uno::Reference< + ::com::sun::star::ui::XImageManager >& rXParentImageManager + ); + + ~SvxIconSelectorDialog(); + + ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > + GetSelectedIcon(); + + DECL_LINK( SelectHdl, ToolBox * ); + DECL_LINK( ImportHdl, PushButton * ); + DECL_LINK( DeleteHdl, PushButton * ); +}; + +class SvxIconReplacementDialog : public MessBox +{ +public: + SvxIconReplacementDialog( + Window *pWindow, + const rtl::OUString& aMessage, + bool aYestoAll); + + SvxIconReplacementDialog( + Window *pWindow, + const rtl::OUString& aMessage ); + + rtl::OUString ReplaceIconName( const rtl::OUString& ); + USHORT ShowDialog(); +}; +//added for issue83555 +class SvxIconChangeDialog : public ModalDialog +{ +private: + FixedImage aFImageInfo; + OKButton aBtnOK; + FixedText aDescriptionLabel; + SvxDescriptionEdit aLineEditDescription; +public: + SvxIconChangeDialog(Window *pWindow, const rtl::OUString& aMessage); +}; +#endif // _SVXCFG_HXX diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx new file mode 100644 index 000000000000..944fca908b8a --- /dev/null +++ b/cui/source/inc/cfgutil.hxx @@ -0,0 +1,212 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _CFGUTIL_HXX +#define _CFGUTIL_HXX + +#include <vector> +#include <rtl/ustring.hxx> +#include <tools/string.hxx> + +#include <com/sun/star/frame/XModel.hpp> +#include <com/sun/star/frame/XFrame.hpp> +#include <com/sun/star/lang/XSingleComponentFactory.hpp> +#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/script/browse/XBrowseNode.hpp> + +#define _SVSTDARR_STRINGSDTOR +#include <svl/svstdarr.hxx> + +#include <vcl/timer.hxx> +#include <svtools/svtabbx.hxx> +#include <svtools/svtreebx.hxx> +#include <vcl/image.hxx> + +class BasicManager; +class SfxSlotPool; +class SfxStringItem; +class SfxFontItem; +class SfxMacroInfoItem; +class SfxMacroInfo; +struct SfxStyleInfo_Impl; +struct SfxStylesInfo_Impl; + +#define css ::com::sun::star + +struct SfxStyleInfo_Impl +{ + ::rtl::OUString sFamily; + ::rtl::OUString sStyle; + ::rtl::OUString sCommand; + ::rtl::OUString sLabel; + + SfxStyleInfo_Impl() + {} + + SfxStyleInfo_Impl(const SfxStyleInfo_Impl& rCopy) + { + sFamily = rCopy.sFamily; + sStyle = rCopy.sStyle; + sCommand = rCopy.sCommand; + sLabel = rCopy.sLabel; + } +}; + +struct SfxStylesInfo_Impl +{ + private: + + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xDoc; + + public: + + SfxStylesInfo_Impl(); + void setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel); + + sal_Bool parseStyleCommand(SfxStyleInfo_Impl& aStyle); + void getLabel4Style(SfxStyleInfo_Impl& aStyle); + + ::std::vector< SfxStyleInfo_Impl > getStyleFamilies(); + ::std::vector< SfxStyleInfo_Impl > getStyles(const ::rtl::OUString& sFamily); + + static ::rtl::OUString generateCommand(const ::rtl::OUString& sFamily, const ::rtl::OUString& sStyle); +}; + +#define SFX_CFGGROUP_FUNCTION 1 +#define SFX_CFGGROUP_BASICMGR 2 +#define SFX_CFGGROUP_DOCBASICMGR 3 +#define SFX_CFGGROUP_BASICLIB 4 +#define SFX_CFGGROUP_BASICMOD 5 +#define SFX_CFGFUNCTION_MACRO 6 +#define SFX_CFGFUNCTION_SLOT 7 +#define SFX_CFGGROUP_SCRIPTCONTAINER 8 +#define SFX_CFGFUNCTION_SCRIPT 9 +#define SFX_CFGGROUP_STYLES 10 +#define SFX_CFGGROUP_SPECIALCHARACTERS 11 + +struct SfxGroupInfo_Impl +{ + USHORT nKind; + USHORT nOrd; + void* pObject; + BOOL bWasOpened; + String sCommand; + String sLabel; + + SfxGroupInfo_Impl( USHORT n, USHORT nr, void* pObj = 0 ) : + nKind( n ), nOrd( nr ), pObject( pObj ), bWasOpened(FALSE) {} +}; + +typedef SfxGroupInfo_Impl* SfxGroupInfoPtr; +SV_DECL_PTRARR_DEL(SfxGroupInfoArr_Impl, SfxGroupInfoPtr, 5, 5) + +class SfxConfigFunctionListBox_Impl : public SvTreeListBox +{ + friend class SfxConfigGroupListBox_Impl; + Timer aTimer; + SvLBoxEntry* pCurEntry; + SfxGroupInfoArr_Impl aArr; + SfxStylesInfo_Impl* pStylesInfo; + + DECL_LINK( TimerHdl, Timer* ); + virtual void MouseMove( const MouseEvent& rMEvt ); + +public: + SfxConfigFunctionListBox_Impl( Window*, const ResId& ); + ~SfxConfigFunctionListBox_Impl(); + + void ClearAll(); + using Window::GetHelpText; + String GetHelpText( SvLBoxEntry *pEntry ); + String GetCurCommand(); + String GetCurLabel(); + SfxMacroInfo* GetMacroInfo(); + void FunctionSelected(); + void SetStylesInfo(SfxStylesInfo_Impl* pStyles); +}; + +struct SvxConfigGroupBoxResource_Impl; +class SfxConfigGroupListBox_Impl : public SvTreeListBox +{ + SvxConfigGroupBoxResource_Impl* pImp; + //SfxSlotPool* pSlotPool; + SfxConfigFunctionListBox_Impl* pFunctionListBox; + SfxGroupInfoArr_Impl aArr; + ULONG nMode; + BOOL bShowSF; // show Scripting Framework scripts + BOOL bShowBasic; // show Basic scripts + + ::rtl::OUString m_sModuleLongName; + css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR; + css::uno::Reference< css::frame::XFrame > m_xFrame; + css::uno::Reference< css::container::XNameAccess > m_xGlobalCategoryInfo; + css::uno::Reference< css::container::XNameAccess > m_xModuleCategoryInfo; + css::uno::Reference< css::container::XNameAccess > m_xUICmdDescription; + + Image GetImage( ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode > node, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xCtx, bool bIsRootNode, bool bHighContrast ); + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getDocumentModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xCtx, ::rtl::OUString& docName ); + + void InitModule(); + void InitBasic(); + void InitStyles(); + + ::rtl::OUString MapCommand2UIName(const ::rtl::OUString& sCommand); + + SfxStylesInfo_Impl* pStylesInfo; + +protected: + virtual void RequestingChilds( SvLBoxEntry *pEntry); + using SvListView::Expand; + virtual BOOL Expand( SvLBoxEntry* pParent ); + +public: + SfxConfigGroupListBox_Impl ( Window* pParent, + const ResId&, + ULONG nConfigMode = 0 ); + ~SfxConfigGroupListBox_Impl(); + void ClearAll(); + + void Init(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR , + const css::uno::Reference< css::frame::XFrame >& xFrame , + const ::rtl::OUString& sModuleLongName); + void SetFunctionListBox( SfxConfigFunctionListBox_Impl *pBox ) + { pFunctionListBox = pBox; } + void Open( SvLBoxEntry*, BOOL ); + void GroupSelected(); + void SelectMacro( const SfxMacroInfoItem* ); + void AddAndSelect( const SfxStringItem*, const SfxStringItem* ); + void SelectMacro( const String&, const String& ); + String GetGroup(); + BasicManager* GetBasicManager( const SvLBoxEntry& _rEntry ); + void SetScriptType( const String& rScriptType ); + void SetStylesInfo(SfxStylesInfo_Impl* pStyles); +}; + +#undef css + +#endif + diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx new file mode 100644 index 000000000000..315a78e70a03 --- /dev/null +++ b/cui/source/inc/chardlg.hxx @@ -0,0 +1,396 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_CHARDLG_HXX +#define _SVX_CHARDLG_HXX + +// include --------------------------------------------------------------- + +#include <svtools/ctrlbox.hxx> +#include <svtools/stdctrl.hxx> +#include <sfx2/tabdlg.hxx> +#include <svx/fntctrl.hxx> +#include <svx/checklbx.hxx> +#include <svx/langbox.hxx> + +// forward --------------------------------------------------------------- + +class SvxFontListItem; +class FontList; + +// ----------------------------------------------------------------------- + +#define DISABLE_CASEMAP ((USHORT)0x0001) +#define DISABLE_WORDLINE ((USHORT)0x0002) +#define DISABLE_BLINK ((USHORT)0x0004) +#define DISABLE_UNDERLINE_COLOR ((USHORT)0x0008) + +#define DISABLE_LANGUAGE ((USHORT)0x0010) +#define DISABLE_HIDE_LANGUAGE ((USHORT)0x0020) + +// class SvxCharBasePage ------------------------------------------------- + +class SvxCharBasePage : public SfxTabPage +{ +protected: + SvxFontPrevWindow m_aPreviewWin; + FixedInfo m_aFontTypeFT; + + BOOL m_bPreviewBackgroundToCharacter; + + SvxCharBasePage( Window* pParent, const ResId& rResIdTabPage, const SfxItemSet&, + USHORT nResIdPrewievWin, USHORT nResIdFontTypeFT ); + virtual ~SvxCharBasePage(); + + void SetPrevFontSize( const SfxItemSet& rSet, USHORT nSlot, SvxFont& rFont ); + void SetPrevFont( const SfxItemSet& rSet, USHORT nSlot, SvxFont& rFont ); + void SetPrevFontStyle( const SfxItemSet& rSet, USHORT nSlotPosture, USHORT nSlotWeight, SvxFont& rFont ); // posture/weight + void SetPrevFontWidthScale( const SfxItemSet& rSet ); + + void SetPrevFontEscapement( BYTE nProp, BYTE nEscProp, short nEsc ); + + inline SvxFont& GetPreviewFont(); + inline SvxFont& GetPreviewCJKFont(); + inline SvxFont& GetPreviewCTLFont(); + +public: + using SfxTabPage::ActivatePage; + using SfxTabPage::DeactivatePage; + + virtual void ActivatePage( const SfxItemSet& rSet ); +// virtual int DeactivatePage( SfxItemSet* pSet = 0 ); + +}; + +// class SvxCharNamePage ------------------------------------------------- + +struct SvxCharNamePage_Impl; + +class SvxCharNamePage : public SvxCharBasePage +{ + +private: + FixedLine* m_pWestLine; + FixedText* m_pWestFontNameFT; + FontNameBox* m_pWestFontNameLB; + FixedText* m_pWestFontStyleFT; + FontStyleBox* m_pWestFontStyleLB; + FixedText* m_pWestFontSizeFT; + FontSizeBox* m_pWestFontSizeLB; + FixedText* m_pWestFontLanguageFT; + SvxLanguageBox* m_pWestFontLanguageLB; + + FixedLine* m_pEastLine; + FixedText* m_pEastFontNameFT; + FontNameBox* m_pEastFontNameLB; + FixedText* m_pEastFontStyleFT; + FontStyleBox* m_pEastFontStyleLB; + FixedText* m_pEastFontSizeFT; + FontSizeBox* m_pEastFontSizeLB; + FixedText* m_pEastFontLanguageFT; + SvxLanguageBox* m_pEastFontLanguageLB; + + FixedLine* m_pCTLLine; + FixedText* m_pCTLFontNameFT; + FontNameBox* m_pCTLFontNameLB; + FixedText* m_pCTLFontStyleFT; + FontStyleBox* m_pCTLFontStyleLB; + FixedText* m_pCTLFontSizeFT; + FontSizeBox* m_pCTLFontSizeLB; + FixedText* m_pCTLFontLanguageFT; + SvxLanguageBox* m_pCTLFontLanguageLB; + + FixedLine* m_pColorFL; + FixedText* m_pColorFT; + ColorListBox* m_pColorLB; + + SvxCharNamePage_Impl* m_pImpl; + + SvxCharNamePage( Window* pParent, const SfxItemSet& rSet ); + + void Initialize(); + const FontList* GetFontList() const; + void UpdatePreview_Impl(); + void FillStyleBox_Impl( const FontNameBox* rBox ); + void FillSizeBox_Impl( const FontNameBox* rBox ); + + enum LanguageGroup + { + /** Language for western text. + */ + Western = 0, + + /** Language for asian text. + */ + Asian, + + /** Language for ctl text. + */ + Ctl + }; + + void Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp ); + BOOL FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp ); + void ResetColor_Impl( const SfxItemSet& rSet ); + + DECL_LINK( UpdateHdl_Impl, Timer* ); + DECL_LINK( FontModifyHdl_Impl, void* ); + DECL_LINK( ColorBoxSelectHdl_Impl, ColorListBox* ); + +public: + using SfxTabPage::ActivatePage; + using SfxTabPage::DeactivatePage; + + virtual void ActivatePage( const SfxItemSet& rSet ); + virtual int DeactivatePage( SfxItemSet* pSet = 0 ); + +public: + ~SvxCharNamePage(); + + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); + static USHORT* GetRanges(); + + virtual void Reset( const SfxItemSet& rSet ); + virtual BOOL FillItemSet( SfxItemSet& rSet ); + + void SetFontList( const SvxFontListItem& rItem ); + void EnableRelativeMode(); + void EnableSearchMode(); + // the writer uses SID_ATTR_BRUSH as font background + void SetPreviewBackgroundToCharacter(); + + void DisableControls( USHORT nDisable ); + virtual void PageCreated (SfxAllItemSet aSet); +}; + +// class SvxCharEffectsPage ---------------------------------------------- + +class SvxCharEffectsPage : public SvxCharBasePage +{ + +private: + FixedText m_aFontColorFT; + ColorListBox m_aFontColorLB; + + FixedText m_aEffectsFT; + SvxCheckListBox m_aEffectsLB; + + ListBox m_aEffects2LB; + + FixedText m_aReliefFT; + ListBox m_aReliefLB; + + TriStateBox m_aOutlineBtn; + TriStateBox m_aShadowBtn; + TriStateBox m_aBlinkingBtn; + TriStateBox m_aHiddenBtn; + + FixedLine m_aVerticalLine; + + FixedText m_aOverlineFT; + ListBox m_aOverlineLB; + FixedText m_aOverlineColorFT; + ColorListBox m_aOverlineColorLB; + + FixedText m_aStrikeoutFT; + ListBox m_aStrikeoutLB; + + FixedText m_aUnderlineFT; + ListBox m_aUnderlineLB; + FixedText m_aUnderlineColorFT; + ColorListBox m_aUnderlineColorLB; + + CheckBox m_aIndividualWordsBtn; + + FixedLine m_aAsianLine; + + FixedText m_aEmphasisFT; + ListBox m_aEmphasisLB; + + FixedText m_aPositionFT; + ListBox m_aPositionLB; + + USHORT m_nHtmlMode; + + String m_aTransparentColorName; + + SvxCharEffectsPage( Window* pParent, const SfxItemSet& rSet ); + + void Initialize(); + void UpdatePreview_Impl(); + void SetCaseMap_Impl( SvxCaseMap eCaseMap ); + void ResetColor_Impl( const SfxItemSet& rSet ); + BOOL FillItemSetColor_Impl( SfxItemSet& rSet ); + + DECL_LINK( SelectHdl_Impl, ListBox* ); + DECL_LINK( CbClickHdl_Impl, CheckBox* ); + DECL_LINK( TristClickHdl_Impl, TriStateBox* ); + DECL_LINK( UpdatePreview_Impl, ListBox* ); + DECL_LINK( ColorBoxSelectHdl_Impl, ColorListBox* ); + +public: +// using SfxTabPage::ActivatePage; + using SfxTabPage::DeactivatePage; + +// virtual void ActivatePage( const SfxItemSet& rSet ); + virtual int DeactivatePage( SfxItemSet* pSet = 0 ); + +public: + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); + static USHORT* GetRanges(); + + virtual void Reset( const SfxItemSet& rSet ); + virtual BOOL FillItemSet( SfxItemSet& rSet ); + + void DisableControls( USHORT nDisable ); + void EnableFlash(); + // the writer uses SID_ATTR_BRUSH as font background + void SetPreviewBackgroundToCharacter(); + virtual void PageCreated (SfxAllItemSet aSet); +}; + +// class SvxCharPositionPage --------------------------------------------- + +class SvxCharPositionPage : public SvxCharBasePage +{ + +private: + FixedLine m_aPositionLine; + RadioButton m_aHighPosBtn; + RadioButton m_aNormalPosBtn; + RadioButton m_aLowPosBtn; + FixedText m_aHighLowFT; + MetricField m_aHighLowEdit; + CheckBox m_aHighLowRB; + FixedText m_aFontSizeFT; + MetricField m_aFontSizeEdit; + FixedLine m_aRotationScalingFL; + FixedLine m_aScalingFL; + RadioButton m_a0degRB; + RadioButton m_a90degRB; + RadioButton m_a270degRB; + CheckBox m_aFitToLineCB; + FixedText m_aScaleWidthFT; + MetricField m_aScaleWidthMF; + + FixedLine m_aKerningLine; + ListBox m_aKerningLB; + FixedText m_aKerningFT; + MetricField m_aKerningEdit; + CheckBox m_aPairKerningBtn; + + short m_nSuperEsc; + short m_nSubEsc; + + UINT16 m_nScaleWidthItemSetVal; + UINT16 m_nScaleWidthInitialVal; + + BYTE m_nSuperProp; + BYTE m_nSubProp; + + SvxCharPositionPage( Window* pParent, const SfxItemSet& rSet ); + + void Initialize(); + void UpdatePreview_Impl( BYTE nProp, BYTE nEscProp, short nEsc ); + void SetEscapement_Impl( USHORT nEsc ); + + DECL_LINK( PositionHdl_Impl, RadioButton* ); + DECL_LINK( RotationHdl_Impl, RadioButton* ); + DECL_LINK( FontModifyHdl_Impl, MetricField* ); + DECL_LINK( AutoPositionHdl_Impl, CheckBox* ); + DECL_LINK( FitToLineHdl_Impl, CheckBox* ); + DECL_LINK( KerningSelectHdl_Impl, ListBox* ); + DECL_LINK( KerningModifyHdl_Impl, MetricField* ); + DECL_LINK( PairKerningHdl_Impl, CheckBox* ); + DECL_LINK( LoseFocusHdl_Impl, MetricField* ); + DECL_LINK( ScaleWidthModifyHdl_Impl, MetricField* ); + +public: + using SfxTabPage::ActivatePage; + using SfxTabPage::DeactivatePage; + + virtual int DeactivatePage( SfxItemSet* pSet = 0 ); + virtual void ActivatePage( const SfxItemSet& rSet ); + +public: + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); + static USHORT* GetRanges(); + + virtual void Reset( const SfxItemSet& rSet ); + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void FillUserData(); + // the writer uses SID_ATTR_BRUSH as font background + void SetPreviewBackgroundToCharacter(); + virtual void PageCreated (SfxAllItemSet aSet); +}; + +// class SvxCharTwoLinesPage --------------------------------------------- + +class SvxCharTwoLinesPage : public SvxCharBasePage +{ +private: + FixedLine m_aSwitchOnLine; + CheckBox m_aTwoLinesBtn; + + FixedLine m_aEncloseLine; + FixedText m_aStartBracketFT; + ListBox m_aStartBracketLB; + FixedText m_aEndBracketFT; + ListBox m_aEndBracketLB; + + USHORT m_nStartBracketPosition; + USHORT m_nEndBracketPosition; + + SvxCharTwoLinesPage( Window* pParent, const SfxItemSet& rSet ); + + void UpdatePreview_Impl(); + void Initialize(); + void SelectCharacter( ListBox* pBox ); + void SetBracket( sal_Unicode cBracket, BOOL bStart ); + + DECL_LINK( TwoLinesHdl_Impl, CheckBox* ); + DECL_LINK( CharacterMapHdl_Impl, ListBox* ); + +public: + using SfxTabPage::ActivatePage; + using SfxTabPage::DeactivatePage; + + virtual void ActivatePage( const SfxItemSet& rSet ); + virtual int DeactivatePage( SfxItemSet* pSet = 0 ); + +public: + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); + static USHORT* GetRanges(); + + virtual void Reset( const SfxItemSet& rSet ); + virtual BOOL FillItemSet( SfxItemSet& rSet ); + // the writer uses SID_ATTR_BRUSH as font background + void SetPreviewBackgroundToCharacter(); + virtual void PageCreated (SfxAllItemSet aSet); +}; + +#endif // #ifndef _SVX_CHARDLG_HXX + diff --git a/cui/source/inc/connect.hxx b/cui/source/inc/connect.hxx new file mode 100644 index 000000000000..88e30ac7dd7a --- /dev/null +++ b/cui/source/inc/connect.hxx @@ -0,0 +1,118 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_CONNECT_HXX +#define _SVX_CONNECT_HXX + +// include --------------------------------------------------------------- + +#include <svx/connctrl.hxx> +#include <sfx2/tabdlg.hxx> +#include <vcl/fixed.hxx> +#include <vcl/field.hxx> +#include <vcl/lstbox.hxx> +#include <vcl/group.hxx> +#include <sfx2/basedlgs.hxx> + +class SdrView; + +/************************************************************************* +|* +|* Dialog zum Aendern von Konnektoren (Connectors) +|* +\************************************************************************/ + +class SvxConnectionPage : public SfxTabPage +{ +private: + FixedText aFtType; + ListBox aLbType; + + FixedLine aFlDelta; + FixedText aFtLine1; + MetricField aMtrFldLine1; + FixedText aFtLine2; + MetricField aMtrFldLine2; + FixedText aFtLine3; + MetricField aMtrFldLine3; + + FixedLine aFlDistance; + FixedText aFtHorz1; + MetricField aMtrFldHorz1; + FixedText aFtVert1; + MetricField aMtrFldVert1; + FixedText aFtHorz2; + MetricField aMtrFldHorz2; + FixedText aFtVert2; + MetricField aMtrFldVert2; + + SvxXConnectionPreview aCtlPreview; + + const SfxItemSet& rOutAttrs; + SfxItemSet aAttrSet; + const SdrView* pView; + SfxMapUnit eUnit; + +#ifdef _SVX_CONNECT_CXX + void FillTypeLB(); + + DECL_LINK( ChangeAttrHdl_Impl, void * ); +#endif + +public: + + SvxConnectionPage( Window* pWindow, const SfxItemSet& rInAttrs ); + ~SvxConnectionPage(); + + static SfxTabPage* Create( Window*, const SfxItemSet& ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet & ); + + void Construct(); + void SetView( const SdrView* pSdrView ) { pView = pSdrView; } + virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001 +}; + +/************************************************************************* +|* +|* Von SfxSingleTabDialog abgeleitet, um vom Control "uber virtuelle Methode +|* benachrichtigt werden zu k"onnen. +|* +\************************************************************************/ + +class SvxConnectionDialog : public SfxSingleTabDialog +{ +public: + SvxConnectionDialog( Window* pParent, const SfxItemSet& rAttr, + const SdrView* pView ); + ~SvxConnectionDialog(); +}; + + +#endif // _SVX_CONNECT_HXX + diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx new file mode 100644 index 000000000000..805f90313e29 --- /dev/null +++ b/cui/source/inc/cuicharmap.hxx @@ -0,0 +1,143 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _CUI_CHARMAP_HXX +#define _CUI_CHARMAP_HXX + +// include --------------------------------------------------------------- + +#include <vcl/ctrl.hxx> +#include <vcl/metric.hxx> +#include <vcl/button.hxx> +#include <vcl/fixed.hxx> +#include <vcl/lstbox.hxx> +#include <sfx2/basedlgs.hxx> +#include <svx/charmap.hxx> + +class SubsetMap; +class SvxCharMapData; + +// define ---------------------------------------------------------------- + +#define CHARMAP_MAXLEN 32 + +namespace svx +{ + struct SvxShowCharSetItem; + class SvxShowCharSetVirtualAcc; +} +// class SvxCharacterMap ------------------------------------------------- +// the main purpose of this dialog is to enable the use of characters +// that are not easily accesible from the keyboard + +// class SvxShowText ===================================================== + +class SvxShowText : public Control +{ +public: + SvxShowText( Window* pParent, + const ResId& rResId, + BOOL bCenter = FALSE ); + ~SvxShowText(); + + void SetFont( const Font& rFont ); + void SetText( const String& rText ); + +protected: + virtual void Paint( const Rectangle& ); + +private: + long mnY; + BOOL mbCenter; + +}; + +class SvxCharMapData +{ +public: + SvxCharMapData( class SfxModalDialog* pDialog, BOOL bOne_, ResMgr* pResContext ); + + void SetCharFont( const Font& rFont ); + +private: +friend class SvxCharacterMap; + SfxModalDialog* mpDialog; + + SvxShowCharSet aShowSet; + SvxShowText aShowText; +// SvxShowText aShowShortcut; + OKButton aOKBtn; + CancelButton aCancelBtn; + HelpButton aHelpBtn; + PushButton aDeleteBtn; +// PushButton aAssignBtn; + FixedText aFontText; + ListBox aFontLB; + FixedText aSubsetText; + ListBox aSubsetLB; + FixedText aSymbolText; + SvxShowText aShowChar; + FixedText aCharCodeText; +// FixedText aAssignText; + Font aFont; + BOOL bOne; + const SubsetMap* pSubsetMap; + + DECL_LINK( OKHdl, OKButton* ); + DECL_LINK( FontSelectHdl, ListBox* ); + DECL_LINK( SubsetSelectHdl, ListBox* ); + DECL_LINK( CharDoubleClickHdl, Control* pControl ); + DECL_LINK( CharSelectHdl, Control* pControl ); + DECL_LINK( CharHighlightHdl, Control* pControl ); + DECL_LINK( CharPreSelectHdl, Control* pControl ); + DECL_LINK( DeleteHdl, PushButton* pBtn ); + DECL_LINK( AssignHdl, PushButton* pBtn ); +}; + +class SvxCharacterMap : public SfxModalDialog +{ +private: + SvxCharMapData* mpCharMapData; + +public: + SvxCharacterMap( Window* pParent, BOOL bOne=TRUE, const SfxItemSet* pSet=0 ); + ~SvxCharacterMap(); + + void DisableFontSelection(); + + const Font& GetCharFont() const; + void SetCharFont( const Font& rFont ); + + void SetChar( sal_UCS4 ); + sal_UCS4 GetChar() const; + + String GetCharacters() const; + + virtual short Execute(); +}; + +#endif + diff --git a/cui/source/inc/cuifmsearch.hxx b/cui/source/inc/cuifmsearch.hxx new file mode 100644 index 000000000000..5f37371db4aa --- /dev/null +++ b/cui/source/inc/cuifmsearch.hxx @@ -0,0 +1,227 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _CUI_FMSEARCH_HXX +#define _CUI_FMSEARCH_HXX + +#include <com/sun/star/sdbc/XResultSet.hpp> + +#include <svx/fmsearch.hxx> //CHINA001 + +#define _SVSTDARR_STRINGSDTOR +#include <svl/svstdarr.hxx> + +#ifndef _DIALOG_HXX //autogen +#include <vcl/dialog.hxx> +#endif + +#ifndef _BUTTON_HXX //autogen +#include <vcl/button.hxx> +#endif + +#ifndef _FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif + +#ifndef _EDIT_HXX //autogen +#include <vcl/edit.hxx> +#endif +#include <vcl/combobox.hxx> +#include <vcl/lstbox.hxx> +#include <tools/link.hxx> +#include <comphelper/uno3.hxx> +#include <comphelper/stl_types.hxx> +#include <tools/string.hxx> + +namespace svxform { + class FmSearchConfigItem; +} + +// =================================================================================================== +// = class FmSearchDialog - Dialog fuer Suchen in Formularen/Tabellen +// =================================================================================================== + +struct FmSearchProgress; + +class FmSearchEngine; + +class FmSearchDialog : public ModalDialog +{ + friend class FmSearchEngine; + + // meine ganzen Controls + FixedLine m_flSearchFor; + RadioButton m_rbSearchForText; + RadioButton m_rbSearchForNull; + RadioButton m_rbSearchForNotNull; + ComboBox m_cmbSearchText; + FixedLine m_flWhere; + FixedText m_ftForm; + ListBox m_lbForm; + RadioButton m_rbAllFields; + RadioButton m_rbSingleField; + ListBox m_lbField; + FixedLine m_flOptions; + FixedText m_ftPosition; + ListBox m_lbPosition; + CheckBox m_cbUseFormat; + CheckBox m_cbCase; + CheckBox m_cbBackwards; + CheckBox m_cbStartOver; + CheckBox m_cbWildCard; + CheckBox m_cbRegular; + CheckBox m_cbApprox; + PushButton m_pbApproxSettings; + CheckBox m_aHalfFullFormsCJK; + CheckBox m_aSoundsLikeCJK; + PushButton m_aSoundsLikeCJKSettings; + FixedLine m_flState; + FixedText m_ftRecordLabel; + FixedText m_ftRecord; + FixedText m_ftHint; + PushButton m_pbSearchAgain; + CancelButton m_pbClose; + HelpButton m_pbHelp; + String m_sSearch; + String m_sCancel; + + Window* m_pPreSearchFocus; + + Link m_lnkFoundHandler; // Handler fuer "gefunden" + Link m_lnkCanceledNotFoundHdl; // Handler fuer Positionierung des Cursors + + Link m_lnkContextSupplier; // fuer Suche in verschiedenen Kontexten + + // ein Array, in dem ich mir fuer jeden Kontext das aktuell selektierte Feld merke + ::std::vector<String> m_arrContextFields; + + // fuer die eigentliche Arbeit ... + FmSearchEngine* m_pSearchEngine; + + Timer m_aDelayedPaint; + // siehe EnableSearchUI + + ::svxform::FmSearchConfigItem* m_pConfig; +public: + /** hiermit kann in verschiedenen Saetzen von Feldern gesucht werden. Es gibt eine Reihe von Kontexten, deren Namen in + strContexts stehen (getrennt durch ';'), der Benutzer kann einen davon auswaehlen. + Wenn der Benutzer einen Kontext auswaehlt, wird lnkContextSupplier aufgerufen, er bekommt einen Zeiger auf eine + FmSearchContext-Struktur, die gefuellt werden muss. + Fuer die Suche gilt dann : + a) bei formatierter Suche wird der Iterator selber verwendet (wie beim ersten Constructor auch) + b) bei formatierter Suche wird NICHT der FormatKey an den Fields des Iterators verwendet, sondern die entsprechende + TextComponent wird gefragt (deshalb auch die Verwendung des originalen Iterator, durch dessen Move werden hoffentlich + die hinter den TextComponent-Interfaces stehenden Controls geupdatet) + c) bei nicht formatierter Suche wird ein Clone des Iterators verwendet (da ich hier die TextComponent-Interfaces nicht + fragen muss) + (natuerlich zwingend erforderlich : der String Nummer i in strUsedFields eines Kontexts muss mit dem Interface Nummer i + in arrFields des Kontexts korrespondieren) + */ + FmSearchDialog(Window* pParent, const String& strInitialText, const ::std::vector< String >& _rContexts, sal_Int16 nInitialContext, + const Link& lnkContextSupplier); + + virtual ~FmSearchDialog(); + + /** der Found-Handler bekommt im "gefunden"-Fall einen Zeiger auf eine FmFoundRecordInformation-Struktur + (dieser ist nur im Handler gueltig, wenn man sich also die Daten merken muss, nicht den Zeiger, sondern die + Struktur kopieren) + Dieser Handler MUSS gesetzt werden. + Ausserdem sollte beachtet werden, dass waehrend des Handlers der Suchdialog immer noch modal ist + */ + void SetFoundHandler(const Link& lnk) { m_lnkFoundHandler = lnk; } + /** + Wenn die Suche abgebrochen oder erfolglos beendet wurde, wird im Suchdialog immer der aktuelle Datensatz angezeigt + Damit das mit der eventuellen Anzeige des Aufrufers synchron geht, existiert dieser Handler (der nicht undbedingt gesetzt + werden muss). + Der dem Handler uebergebene Zeiger zeigt auf eine FmFoundRecordInformation-Struktur, bei der aPosition und eventuell + (bei Suche mit Kontexten) nContext gueltig sind. + */ + void SetCanceledNotFoundHdl(const Link& lnk) { m_lnkCanceledNotFoundHdl = lnk; } + + inline void SetActiveField(const String& strField); + +protected: + virtual sal_Bool Close(); + + void Init(const String& strVisibleFields, const String& strInitialText); + // nur von den Constructoren aus zu verwenden + + void OnFound(const ::com::sun::star::uno::Any& aCursorPos, sal_Int16 nFieldPos); + + void EnableSearchUI(sal_Bool bEnable); + // beim Suchen in einem eigenen Thread moechte ich natuerlich die UI zum Starten/Parameter-Setzen der Suche disablen + // Bei bEnable == sal_False wird fuer alle betroffenen Controls das Painten kurz aus- und mittels m_aDelayedPaint nach + // einer kurzen Weile wieder angeschaltet. Wenn inzwischen eine Anforderung mit bEnable==sal_True kommt, wird der Timer gestoppt + // und das Painten gleich wieder angeschaltet. Als Konsequenz dieses umstaendlichen Vorgehens ist kein Flackern zu sehen, + // wenn man schnell hintereinander aus- und wieder einschaltet. + + void EnableSearchForDependees(sal_Bool bEnable); + + void EnableControlPaint(sal_Bool bEnable); + // enabled (disabled) fuer alle wichtigen Controls ihr Paint + + void InitContext(sal_Int16 nContext); + + void LoadParams(); + void SaveParams() const; + +private: + // Handler fuer die Controls + DECL_LINK( OnClickedFieldRadios, Button* ); + DECL_LINK( OnClickedSearchAgain, Button* ); + DECL_LINK( OnClickedSpecialSettings, Button* ); + + DECL_LINK( OnSearchTextModified, ComboBox* ); + + DECL_LINK( OnPositionSelected, ListBox* ); + DECL_LINK( OnFieldSelected, ListBox* ); + + DECL_LINK( OnCheckBoxToggled, CheckBox* ); + + DECL_LINK( OnContextSelection, ListBox* ); + + // Such-Fortschritt + DECL_LINK( OnSearchProgress, FmSearchProgress* ); + + DECL_LINK( OnDelayedPaint, void* ); + // siehe EnableSearchUI + + void implMoveControls(Control** _ppControls, sal_Int32 _nControls, sal_Int32 _nUp, Control* _pToResize); + + void initCommon( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& _rxCursor ); +}; + +inline void FmSearchDialog::SetActiveField(const String& strField) +{ + sal_uInt16 nInitialField = m_lbField.GetEntryPos(strField); + if (nInitialField == COMBOBOX_ENTRY_NOTFOUND) + nInitialField = 0; + m_lbField.SelectEntryPos(nInitialField); + LINK(this, FmSearchDialog, OnFieldSelected).Call(&m_lbField); +} + +#endif // _CUI_FMSEARCH_HXX diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx new file mode 100644 index 000000000000..56aedff40de1 --- /dev/null +++ b/cui/source/inc/cuigaldlg.hxx @@ -0,0 +1,372 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _CUI_GALDLG_HXX_ +#define _CUI_GALDLG_HXX_ + +#include <vos/thread.hxx> +#include <vcl/dialog.hxx> +#include <vcl/graph.hxx> +#include <vcl/fixed.hxx> +#include <vcl/button.hxx> +#include <vcl/lstbox.hxx> +#include <vcl/menu.hxx> +#include <vcl/edit.hxx> +#include <vcl/combobox.hxx> +#include <svl/slstitm.hxx> +#include <svtools/transfer.hxx> +#include <svtools/grfmgr.hxx> +#include <sfx2/tabdlg.hxx> +#include <svx/galctrl.hxx> +#include <svx/galmisc.hxx> +#include <com/sun/star/media/XPlayer.hpp> +#include <com/sun/star/ui/dialogs/XFolderPicker.hpp> +#include <svtools/dialogclosedlistener.hxx> +#include <bootstrp/sstring.hxx> + +// ------------ +// - Forwards - +// ------------ + +class Gallery; +class GalleryTheme; +class SearchProgress; +class TakeProgress; +class TPGalleryThemeProperties; + +// --------------- +// - FilterEntry - +// --------------- + +struct FilterEntry +{ + String aFilterName; +}; + +// ---------------- +// - SearchThread - +// ---------------- + +class SearchThread : public ::vos::OThread +{ +private: + + SearchProgress* mpProgress; + TPGalleryThemeProperties* mpBrowser; + INetURLObject maStartURL; + + void ImplSearch( const INetURLObject& rStartURL, + const ::std::vector< String >& rFormats, + BOOL bRecursive ); + + virtual void SAL_CALL run(); + virtual void SAL_CALL onTerminated(); + +public: + + SearchThread( SearchProgress* pProgess, + TPGalleryThemeProperties* pBrowser, + const INetURLObject& rStartURL ); + virtual ~SearchThread(); +}; + +// ------------------ +// - SearchProgress - +// ------------------ + +class SearchProgress : public ModalDialog +{ +private: + + FixedText aFtSearchDir; + FixedLine aFLSearchDir; + FixedText aFtSearchType; + FixedLine aFLSearchType; + CancelButton aBtnCancel; + SearchThread maSearchThread; + + DECL_LINK( ClickCancelBtn, void* ); + void Terminate(); + +public: + SearchProgress( Window* pParent, const INetURLObject& rStartURL ); + ~SearchProgress() {}; + + DECL_LINK( CleanUpHdl, void* ); + + virtual short Execute(); + virtual void StartExecuteModal( const Link& rEndDialogHdl ); + void SetFileType( const String& rType ) { aFtSearchType.SetText( rType ); } + void SetDirectory( const INetURLObject& rURL ) { aFtSearchDir.SetText( GetReducedString( rURL, 30 ) ); } +}; + +// -------------- +// - TakeThread - +// -------------- + +class TakeThread : public ::vos::OThread +{ +private: + + TakeProgress* mpProgress; + TPGalleryThemeProperties* mpBrowser; + List& mrTakenList; + + virtual void SAL_CALL run(); + virtual void SAL_CALL onTerminated(); + +public: + + TakeThread( TakeProgress* pProgess, TPGalleryThemeProperties* pBrowser, List& rTakenList ); + virtual ~TakeThread(); +}; + +// ---------------- +// - TakeProgress - +// ---------------- + +class TakeProgress : public ModalDialog +{ +private: + + FixedText aFtTakeFile; + FixedLine aFLTakeProgress; + CancelButton aBtnCancel; + TakeThread maTakeThread; + List maTakenList; + + DECL_LINK( ClickCancelBtn, void* ); + void Terminate(); + +public: + + TakeProgress( Window* pWindow ); + ~TakeProgress() {}; + + DECL_LINK( CleanUpHdl, void* ); + + void SetFile( const INetURLObject& rURL ) { aFtTakeFile.SetText( GetReducedString( rURL, 30 ) ); } + virtual short Execute(); + virtual void StartExecuteModal( const Link& rEndDialogHdl ); +}; + +// --------------------- +// - ActualizeProgress - +// --------------------- + +class ActualizeProgress : public ModalDialog +{ +private: + + FixedText aFtActualizeFile; + FixedLine aFLActualizeProgress; + CancelButton aBtnCancel; + Timer* pTimer; + GalleryTheme* pTheme; + GalleryProgress aStatusProgress; + + DECL_LINK( ClickCancelBtn, void* ); + DECL_LINK( TimeoutHdl, Timer* ); + DECL_LINK( ActualizeHdl, INetURLObject* pURL ); + +public: + ActualizeProgress( Window* pWindow, GalleryTheme* pThm ); + ~ActualizeProgress() {}; + + virtual short Execute(); +}; + +// --------------- +// - TitleDialog - +// --------------- + +class TitleDialog : public ModalDialog +{ +private: + + OKButton maOk; + CancelButton maCancel; + HelpButton maHelp; + FixedLine maFL; + Edit maEdit; + +public: + + TitleDialog( Window* pParent, const String& rOldText ); + String GetTitle() const { return maEdit.GetText(); } +}; + +// ------------------- +// - GalleryIdDialog - +// ------------------- + +class GalleryIdDialog : public ModalDialog +{ +private: + + OKButton aBtnOk; + CancelButton aBtnCancel; + FixedLine aFLId; + ListBox aLbResName; + GalleryTheme* pThm; + + DECL_LINK( ClickOkHdl, void* ); + DECL_LINK( ClickResNameHdl, void* ); + +public: + + GalleryIdDialog( Window* pParent, GalleryTheme* pThm ); + ~GalleryIdDialog() {} + + ULONG GetId() const { return aLbResName.GetSelectEntryPos(); } +}; + +// -------------------------- +// - GalleryThemeProperties - +// -------------------------- + +class GalleryThemeProperties : public SfxTabDialog +{ + ExchangeData* pData; + + virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + +public: + + GalleryThemeProperties( Window* pParent, ExchangeData* pData, SfxItemSet* pItemSet ); + ~GalleryThemeProperties() {} +}; + +// ------------------------- +// - TPGalleryThemeGeneral - +// ------------------------- + +class TPGalleryThemeGeneral : public SfxTabPage +{ +private: + + FixedImage aFiMSImage; + Edit aEdtMSName; + FixedLine aFlMSGeneralFirst; + FixedText aFtMSType; + FixedText aFtMSShowType; + FixedText aFtMSPath; + FixedText aFtMSShowPath; + FixedText aFtMSContent; + FixedText aFtMSShowContent; + FixedLine aFlMSGeneralSecond; + FixedText aFtMSChangeDate; + FixedText aFtMSShowChangeDate; + ExchangeData* pData; + + virtual void Reset( const SfxItemSet& ) {} + virtual BOOL FillItemSet( SfxItemSet& rSet ); + + +public: + + TPGalleryThemeGeneral( Window* pParent, const SfxItemSet& rSet ); + ~TPGalleryThemeGeneral() {} + + void SetXChgData( ExchangeData* pData ); + const ExchangeData* GetXChgData() const { return pData; } + + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); +}; + +// ---------------------------- +// - TPGalleryThemeProperties - +// ---------------------------- + +class TPGalleryThemeProperties : public SfxTabPage +{ + friend class SearchThread; + friend class TakeProgress; + friend class TakeThread; + + PushButton aBtnSearch; + PushButton aBtnTake; + PushButton aBtnTakeAll; + CheckBox aCbxPreview; + ComboBox aCbbFileType; + MultiListBox aLbxFound; + FixedText aFtFileType; + GalleryPreview aWndPreview; + + ExchangeData* pData; + StringList aFoundList; + List aFilterEntryList; + Timer aPreviewTimer; + String aLastFilterName; + String aPreviewString; + INetURLObject aURL; + USHORT nCurFilterPos; + USHORT nFirstExtFilterPos; + BOOL bEntriesFound; + BOOL bInputAllowed; + BOOL bTakeAll; + BOOL bSearchRecursive; + + ::com::sun::star::uno::Reference< ::svt::DialogClosedListener > xDialogListener; + ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > xMediaPlayer; + ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFolderPicker > xFolderPicker; + + virtual void Reset( const SfxItemSet& /*rSet*/ ) {} + virtual BOOL FillItemSet( SfxItemSet& /*rSet*/ ) { return TRUE; } + ::rtl::OUString addExtension( const ::rtl::OUString&, const ::rtl::OUString& ); + void FillFilterList(); + + void SearchFiles(); + void TakeFiles(); + void DoPreview(); + + DECL_LINK( ClickPreviewHdl, void* ); + DECL_LINK( ClickCloseBrowserHdl, void* ); + DECL_LINK( ClickSearchHdl, void* ); + DECL_LINK( ClickTakeHdl, void* ); + DECL_LINK( ClickTakeAllHdl, void* ); + DECL_LINK( SelectFoundHdl, void* ); + DECL_LINK( SelectThemeHdl, void* ); + DECL_LINK( SelectFileTypeHdl, void* ); + DECL_LINK( DClickFoundHdl, void* ); + DECL_LINK( PreviewTimerHdl, void* ); + DECL_LINK( EndSearchProgressHdl, SearchProgress* ); + DECL_LINK( DialogClosedHdl, ::com::sun::star::ui::dialogs::DialogClosedEvent* ); + +public: + TPGalleryThemeProperties( Window* pWindow, const SfxItemSet& rSet ); + ~TPGalleryThemeProperties(); + + void SetXChgData( ExchangeData* pData ); + const ExchangeData* GetXChgData() const { return pData; } + + void StartSearchFiles( const String& _rFolderURL, short _nDlgResult ); + + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); +}; + +#endif // _CUI_GALDLG_HXX_ diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx new file mode 100644 index 000000000000..e7f9047af5ca --- /dev/null +++ b/cui/source/inc/cuigrfflt.hxx @@ -0,0 +1,253 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _CUI_GRFFLT_HXX +#define _CUI_GRFFLT_HXX + +#include <vcl/fixed.hxx> +#include <vcl/field.hxx> +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +#include <vcl/timer.hxx> +#include <vcl/dialog.hxx> +#include <vcl/group.hxx> +#include <vcl/salbtype.hxx> +#include <svtools/grfmgr.hxx> +#include <svx/graphctl.hxx> +#include <svx/dlgctrl.hxx> +#include <svx/rectenum.hxx> +/* +// --------------- +// - Error codes - +// --------------- + +#define SVX_GRAPHICFILTER_ERRCODE_NONE 0x00000000 +#define SVX_GRAPHICFILTER_UNSUPPORTED_GRAPHICTYPE 0x00000001 +#define SVX_GRAPHICFILTER_UNSUPPORTED_SLOT 0x00000002 + +// -------------------- +// - SvxGraphicFilter - +// -------------------- + +class SfxRequest; +class SfxItemSet; + +class SvxGraphicFilter +{ +public: + + static ULONG ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& rFilterObject ); + static void DisableGraphicFilterSlots( SfxItemSet& rSet ); +}; +*/ +// ----------------------- +// - GraphicFilterDialog - +// ----------------------- + +class GraphicFilterDialog : public ModalDialog +{ +private: + + class PreviewWindow : public Control + { + private: + + GraphicObject maGraphic; + + virtual void Paint( const Rectangle& rRect ); + + public: + + PreviewWindow( Window* pParent, const ResId& rResId ); + ~PreviewWindow(); + + void SetGraphic( const Graphic& rGraphic ); + }; + +private: + + Timer maTimer; + Link maModifyHdl; + Graphic maGraphic; + double mfScaleX; + double mfScaleY; + Size maSizePixel; + PreviewWindow maPreview; + FixedLine maFlParameter; + OKButton maBtnOK; + CancelButton maBtnCancel; + HelpButton maBtnHelp; + + DECL_LINK( ImplPreviewTimeoutHdl, Timer* pTimer ); + DECL_LINK( ImplModifyHdl, void* p ); + +protected: + + const Link& GetModifyHdl() const { return maModifyHdl; } + const Size& GetGraphicSizePixel() const { return maSizePixel; } + +public: + + GraphicFilterDialog( Window* pParent, const ResId& rResId, const Graphic& rGraphic ); + ~GraphicFilterDialog(); + + virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) = 0; +}; + +// ----------------------- +// - GraphicFilterMosaic - +// ----------------------- + +class GraphicFilterMosaic : public GraphicFilterDialog +{ +private: + + FixedText maFtWidth; + MetricField maMtrWidth; + FixedText maFtHeight; + MetricField maMtrHeight; + CheckBox maCbxEdges; + +public: + + GraphicFilterMosaic( Window* pParent, const Graphic& rGraphic, + USHORT nTileWidth, USHORT nTileHeight, BOOL bEnhanceEdges ); + ~GraphicFilterMosaic(); + + virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ); + long GetTileWidth() const { return static_cast<long>(maMtrWidth.GetValue()); } + long GetTileHeight() const { return static_cast<long>(maMtrHeight.GetValue()); } + BOOL IsEnhanceEdges() const { return maCbxEdges.IsChecked(); } +}; + +// ------------------------- +// - GraphicFilterSolarize - +// ------------------------- + +class GraphicFilterSolarize : public GraphicFilterDialog +{ +private: + + FixedText maFtThreshold; + MetricField maMtrThreshold; + CheckBox maCbxInvert; + +public: + + GraphicFilterSolarize( Window* pParent, const Graphic& rGraphic, + BYTE nGreyThreshold, BOOL bInvert ); + ~GraphicFilterSolarize(); + + virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ); + BYTE GetGreyThreshold() const { return( (BYTE) FRound( maMtrThreshold.GetValue() * 2.55 ) ); } + BOOL IsInvert() const { return maCbxInvert.IsChecked(); } +}; + +// ---------------------- +// - GraphicFilterSepia - +// ---------------------- + +class GraphicFilterSepia : public GraphicFilterDialog +{ +private: + + FixedText maFtSepia; + MetricField maMtrSepia; + +public: + + GraphicFilterSepia( Window* pParent, const Graphic& rGraphic, + USHORT nSepiaPercent ); + ~GraphicFilterSepia(); + + virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ); + USHORT GetSepiaPercent() const + { return sal::static_int_cast< USHORT >(maMtrSepia.GetValue()); } +}; + +// ----------------------- +// - GraphicFilterPoster - +// ----------------------- + +class GraphicFilterPoster : public GraphicFilterDialog +{ +private: + + FixedText maFtPoster; + NumericField maNumPoster; + +public: + + GraphicFilterPoster( Window* pParent, const Graphic& rGraphic, + USHORT nPosterColorCount ); + ~GraphicFilterPoster(); + + virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ); + USHORT GetPosterColorCount() const { return( (USHORT) maNumPoster.GetValue() ); } +}; + +// ----------------------- +// - GraphicFilterEmboss - +// ----------------------- + +class GraphicFilterEmboss : public GraphicFilterDialog +{ +private: + + class EmbossControl : public SvxRectCtl + { + private: + + Link maModifyHdl; + + virtual void MouseButtonDown( const MouseEvent& rEvt ); + + public: + + EmbossControl( Window* pParent, const ResId& rResId, RECT_POINT eRectPoint ) : + SvxRectCtl( pParent, rResId ) { SetActualRP( eRectPoint ); } + + void SetModifyHdl( const Link& rHdl ) { maModifyHdl = rHdl; } + }; + +private: + + FixedText maFtLight; + EmbossControl maCtlLight; + +public: + + GraphicFilterEmboss( Window* pParent, const Graphic& rGraphic, + RECT_POINT eLightSource ); + ~GraphicFilterEmboss(); + + virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ); + RECT_POINT GetLightSource() const { return maCtlLight.GetActualRP(); } +}; + +#endif diff --git a/cui/source/inc/cuihyperdlg.hxx b/cui/source/inc/cuihyperdlg.hxx new file mode 100644 index 000000000000..d7747385cce3 --- /dev/null +++ b/cui/source/inc/cuihyperdlg.hxx @@ -0,0 +1,114 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _CUI_TAB_HYPERLINK_HXX +#define _CUI_TAB_HYPERLINK_HXX + +// include --------------------------------------------------------------- + +#include <svx/hlnkitem.hxx> +#include <sfx2/childwin.hxx> +#include <sfx2/ctrlitem.hxx> +#include <sfx2/bindings.hxx> +#include <vcl/image.hxx> + +#include "iconcdlg.hxx" + +/************************************************************************* +|* +|* Hyperlink-Dialog +|* +\************************************************************************/ + +class SvxHpLinkDlg; +class SvxHlinkCtrl : public SfxControllerItem +{ +private : + SvxHpLinkDlg *pParent; + + SfxStatusForwarder aOnlineForwarder; + SfxStatusForwarder aRdOnlyForwarder; + +public : + SvxHlinkCtrl( USHORT nId, SfxBindings & rBindings, SvxHpLinkDlg* pDlg); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); +}; + + + +/************************************************************************* +|* +|* Hyperlink-Dialog +|* +\************************************************************************/ + +class SvxHpLinkDlg : public IconChoiceDialog +{ +private: + SvxHlinkCtrl maCtrl; // Controler + SfxBindings* mpBindings; + SfxItemSet* mpItemSet; + + sal_Bool mbDummy1 : 1; + sal_Bool mbDummy2 : 1; + sal_Bool mbDummy3 : 1; + sal_Bool mbDummy4 : 1; + sal_Bool mbDummy5 : 1; + sal_Bool mbGrabFocus : 1; + sal_Bool mbReadOnly : 1; + sal_Bool mbIsHTMLDoc : 1; + + void* mpDummy1; + void* mpDummy2; + + DECL_LINK (ClickApplyHdl_Impl, void * ); + DECL_LINK (ClickCloseHdl_Impl, void * ); + +protected: + virtual BOOL Close(); + virtual void Move(); + +// virtual long PreNotify( NotifyEvent& rNEvt ); +public: + SvxHpLinkDlg (Window* pParent, SfxBindings* pBindings ); + ~SvxHpLinkDlg (); + + virtual void PageCreated( USHORT nId, IconChoicePage& rPage ); + + USHORT SetPage( SvxHyperlinkItem* pItem ); + void EnableInetBrowse( sal_Bool bEnable = sal_True ); + void SetReadOnlyMode( sal_Bool bReadOnly = sal_False ); + inline BOOL IsHTMLDoc() const { return mbIsHTMLDoc; } + + inline SfxBindings* GetBindings() const { return mpBindings; }; + inline SfxDispatcher* GetDispatcher() const { return mpBindings->GetDispatcher(); } +}; + + +#endif // _CUI_TAB_HYPERLINK_HXX diff --git a/cui/source/inc/cuiimapwnd.hxx b/cui/source/inc/cuiimapwnd.hxx new file mode 100644 index 000000000000..0e62fab44318 --- /dev/null +++ b/cui/source/inc/cuiimapwnd.hxx @@ -0,0 +1,54 @@ +#ifndef _CUI_IMAPWND_HXX +#define _CUI_IMAPWND_HXX + +#include <vcl/dialog.hxx> +#include <vcl/fixed.hxx> +#include <vcl/combobox.hxx> +#include <vcl/button.hxx> +#include <vcl/menu.hxx> +#include <svl/itempool.hxx> +#include <svtools/imapobj.hxx> +#include <svtools/transfer.hxx> +#include <svtools/imap.hxx> +#include <sfx2/frame.hxx> +#include <svtools/svmedit.hxx> + + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +class URLDlg : public ModalDialog +{ + FixedText maFtURL; + Edit maEdtURL; + FixedText maFtTarget; + ComboBox maCbbTargets; + FixedText maFtName; + Edit maEdtName; + FixedText maFtAlternativeText; + Edit maEdtAlternativeText; + FixedText maFtDescription; + MultiLineEdit maEdtDescription; + FixedLine maFlURL; + HelpButton maBtnHelp; + OKButton maBtnOk; + CancelButton maBtnCancel; + +public: + + URLDlg( Window* pWindow, + const String& rURL, const String& rAlternativeText, const String& rDescription, + const String& rTarget, const String& rName, + TargetList& rTargetList ); + + String GetURL() const { return maEdtURL.GetText(); } + String GetAltText() const { return maEdtAlternativeText.GetText(); } + String GetDesc() const { return maEdtDescription.GetText(); } + String GetTarget() const { return maCbbTargets.GetText(); } + String GetName() const { return maEdtName.GetText(); } +}; + +#endif diff --git a/cui/source/inc/cuioptgenrl.hxx b/cui/source/inc/cuioptgenrl.hxx new file mode 100644 index 000000000000..e978edbdc1af --- /dev/null +++ b/cui/source/inc/cuioptgenrl.hxx @@ -0,0 +1,127 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_CUIOPTGENRL_HXX +#define _SVX_CUIOPTGENRL_HXX + +// include --------------------------------------------------------------- + +#include <svx/optgenrl.hxx> +#include <sfx2/tabdlg.hxx> +#include <vcl/fixed.hxx> +#include <vcl/edit.hxx> +#include <vcl/group.hxx> + +// forward --------------------------------------------------------------- + +struct GeneralTabPage_Impl; + +#define SfxGeneralTabPage SvxGeneralTabPage +#define INDEX_NOTSET ((sal_Int16)-1) + +// class SvxUserEdit ----------------------------------------------------- + +class SvxUserEdit : public Edit +{ +private: + sal_Int16 m_nIndex; + FixedText* m_pLabel; + +public: + SvxUserEdit( Window* pParent, const ResId& rResId, + sal_Int16 nIndex = INDEX_NOTSET, FixedText* pLabel = NULL ) : + Edit( pParent, rResId, true ), m_nIndex( nIndex ), m_pLabel( pLabel ) {} + + inline void SetIndex( sal_Int16 nIndex ) { m_nIndex = nIndex; } + inline sal_Int16 GetIndex() const { return m_nIndex; } + inline void SetLabel( FixedText* pLabel ) { m_pLabel = pLabel; } + inline FixedText* GetLabel() const { return m_pLabel; } +}; + +// class SvxGeneralTabPage ----------------------------------------------- + +class SvxGeneralTabPage : public SfxTabPage +{ + using TabPage::DeactivatePage; +private: + FixedLine aAddrFrm; + FixedText aCompanyLbl; + SvxUserEdit aCompanyEdit; + FixedText aNameLbl; + FixedText aNameLblRuss; + FixedText aNameLblEastern; + SvxUserEdit aFirstName; + SvxUserEdit aFatherName; + SvxUserEdit aName; + SvxUserEdit aShortName; + FixedText aStreetLbl; + FixedText aStreetLblRuss; + SvxUserEdit aStreetEdit; + SvxUserEdit aApartmentNrEdit; + FixedText aCityLbl; + SvxUserEdit aPLZEdit; + SvxUserEdit aCityEdit; + SvxUserEdit aUsCityEdit; + SvxUserEdit aUsStateEdit; + SvxUserEdit aUsZipEdit; + FixedText aCountryLbl; + SvxUserEdit aCountryEdit; + FixedText aTitlePosLbl; + SvxUserEdit aTitleEdit; + SvxUserEdit aPositionEdit; + FixedText aPhoneLbl; + SvxUserEdit aTelPrivEdit; + SvxUserEdit aTelCompanyEdit; + FixedText aFaxMailLbl; + SvxUserEdit aFaxEdit; + SvxUserEdit aEmailEdit; + CheckBox aUseDataCB; + + GeneralTabPage_Impl* pImpl; + +#ifdef _SVX_OPTGENRL_CXX + DECL_LINK( ModifyHdl_Impl, Edit * ); + + sal_Bool GetAddress_Impl(); + void SetAddress_Impl(); +#endif + +protected: + virtual int DeactivatePage( SfxItemSet* pSet ); + +public: + SvxGeneralTabPage( Window* pParent, const SfxItemSet& rSet ); + ~SvxGeneralTabPage(); + + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); + + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); +}; + +#endif // #ifndef _SVX_CUIOPTGENRL_HXX + + diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc new file mode 100755 index 000000000000..52549e934ecc --- /dev/null +++ b/cui/source/inc/cuires.hrc @@ -0,0 +1,442 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _CUI_RESID_HRC +#define _CUI_REDID_HRC + +// include ------------------------------------------------------------------ + +#include <sfx2/sfx.hrc> +#include <sfx2/dialogs.hrc> + +// Resource-Id's ------------------------------------------------------------ + +// Bitte FIRSTFREE pflegen!!! (gilt nicht f"ur Strings) +#define RID_SVX_FIRSTFREE 305 + +// Gallery +#define RID_CUI_GALLERY_START (RID_SVX_START + 360) +#define RID_CUI_GALLERY_END (RID_SVX_START + 410) + +// tab pages +// used in "dialogs" +#define RID_SVX_FORMAT_CELLS_DLG ( RID_SVX_START + 42 ) + +// used in "tabpages" +#define RID_SVXDLG_TEXT (RID_SVX_START + 183) +#define RID_SVXDLG_TRANSFORM (RID_SVX_START + 45) +#define RID_SVXDLG_LINE (RID_SVX_START + 50) +#define RID_SVXDLG_BBDLG (RID_SVX_START + 40) +#define RID_SVXDLG_CAPTION (RID_SVX_START + 151) +#define RID_SVXDLG_AREA (RID_SVX_START + 55) +#define RID_SVXSTRARY_PAPERSIZE_STD (RID_SVX_START + 142) +#define RID_SVXSTRARY_PAPERSIZE_DRAW (RID_SVX_START + 143) +#define RID_SVXSTR_TABLE_PRESET_NONE (RID_SVX_START + 969) +#define RID_SVXSTR_TABLE_PRESET_ONLYOUTER (RID_SVX_START + 970) +#define RID_SVXSTR_TABLE_PRESET_OUTERHORI (RID_SVX_START + 971) +#define RID_SVXSTR_TABLE_PRESET_OUTERALL (RID_SVX_START + 972) +#define RID_SVXSTR_TABLE_PRESET_OUTERINNER (RID_SVX_START + 973) +#define RID_SVXSTR_PARA_PRESET_DIAGONAL (RID_SVX_START + 974) +#define RID_SVXSTR_PARA_PRESET_ALL (RID_SVX_START + 975) +#define RID_SVXSTR_PARA_PRESET_LEFTRIGHT (RID_SVX_START + 976) +#define RID_SVXSTR_PARA_PRESET_TOPBOTTOM (RID_SVX_START + 977) +#define RID_SVXSTR_PARA_PRESET_ONLYLEFT (RID_SVX_START + 978) +#define RID_SVXSTR_SHADOW_STYLE_NONE (RID_SVX_START + 979) +#define RID_SVXSTR_SHADOW_STYLE_BOTTOMRIGHT (RID_SVX_START + 980) +#define RID_SVXSTR_SHADOW_STYLE_TOPRIGHT (RID_SVX_START + 981) +#define RID_SVXSTR_SHADOW_STYLE_BOTTOMLEFT (RID_SVX_START + 982) +#define RID_SVXSTR_SHADOW_STYLE_TOPLEFT (RID_SVX_START + 983) +#define RID_SVXSTR_HOR_PRESET_ONLYHOR (RID_SVX_START + 1113) +#define RID_SVXSTR_VER_PRESET_ONLYVER (RID_SVX_START + 1114) +#define RID_SVXSTR_FRAMEDIR_LTR (RID_SVX_START + 960) +#define RID_SVXSTR_FRAMEDIR_RTL (RID_SVX_START + 961) +#define RID_SVXSTR_FRAMEDIR_SUPER (RID_SVX_START + 962) +#define RID_SVXSTR_PAGEDIR_LTR_HORI (RID_SVX_START + 965) +#define RID_SVXSTR_PAGEDIR_RTL_HORI (RID_SVX_START + 966) +#define RID_SVXSTR_PAGEDIR_RTL_VERT (RID_SVX_START + 967) +#define RID_SVXSTR_PAGEDIR_LTR_VERT (RID_SVX_START + 968) +#define RID_STR_EDIT_GRAPHIC (RID_SVX_START + 509) +#define RID_SVXIMG_LOAD_H (RID_SVX_START + 283) +#define RID_SVXIMG_SAVE_H (RID_SVX_START + 284) + +#define RID_SVXSTR_DESC_GRADIENT (RID_SVX_START + 163) +#define RID_SVXSTR_ASK_DEL_GRADIENT (RID_SVX_START + 165) +#define RID_SVXSTR_ASK_CHANGE_GRADIENT (RID_SVX_START + 166) +#define RID_SVXSTR_ASK_DEL_BITMAP (RID_SVX_START + 171) +#define RID_SVXSTR_ASK_CHANGE_BITMAP (RID_SVX_START + 172) +#define RID_SVXSTR_DESC_NEW_BITMAP (RID_SVX_START + 168) +#define RID_SVXSTR_DESC_EXT_BITMAP (RID_SVX_START + 169) +#define RID_SVXSTR_DESC_LINESTYLE (RID_SVX_START + 174) +#define RID_SVXSTR_ASK_DEL_LINESTYLE (RID_SVX_START + 176) +#define RID_SVXSTR_ASK_CHANGE_LINESTYLE (RID_SVX_START + 177) +#define RID_SVXSTR_DESC_HATCH (RID_SVX_START + 232) +#define RID_SVXSTR_ASK_DEL_HATCH (RID_SVX_START + 234) +#define RID_SVXSTR_ASK_CHANGE_HATCH (RID_SVX_START + 235) +#define RID_SVXSTR_CHANGE (RID_SVX_START + 181) +#define RID_SVXSTR_ADD (RID_SVX_START + 182) +#define RID_SVXSTR_DESC_COLOR (RID_SVX_START + 215) +#define RID_SVXSTR_ASK_DEL_COLOR (RID_SVX_START + 217) +#define RID_SVXSTR_ASK_CHANGE_COLOR (RID_SVX_START + 218) +#define RID_SVXSTR_TABLE (RID_SVX_START + 220) +#define RID_SVXSTR_WRITE_DATA_ERROR (RID_SVX_START + 229) +#define RID_SVXSTR_READ_DATA_ERROR (RID_SVX_START + 230) +#define RID_SVXSTR_WARN_TABLE_OVERWRITE (RID_SVX_START + 231) +#define RID_SVXSTR_ASK_CHANGE_LINEEND (RID_SVX_START + 184) +#define RID_SVXSTR_ASK_DEL_LINEEND (RID_SVX_START + 219) +#define RID_SVXSTR_DESC_LINEEND (RID_SVX_START + 238) +#define RID_SVXSTR_WARN_NAME_DUPLICATE (RID_SVX_START + 236) + +// autocor +#define RID_OFAPAGE_AUTOCOMPLETE_OPTIONS (RID_OFA_START + 119) +#define RID_OFAPAGE_AUTOCORR_OPTIONS (RID_OFA_START + 102) +#define RID_OFAPAGE_AUTOFMT_APPLY (RID_OFA_START + 110) +#define RID_OFAPAGE_AUTOCORR_REPLACE (RID_OFA_START + 103) +#define RID_OFAPAGE_AUTOCORR_EXCEPT (RID_OFA_START + 104) +#define RID_OFAPAGE_AUTOCORR_QUOTE (RID_OFA_START + 109) +#define RID_OFADLG_PRCNT_SET (RID_OFA_START + 111) + +// options +#define RID_SVXSTR_DIAGRAM_ROW (RID_SVX_START + 1162) +#define RID_OFAPAGE_CONNPOOLOPTIONS (RID_OFA_START + 122) +#define QUERY_DELETE_CONFIRM (RID_SVX_START + 1110) +#define RID_SVXPAGE_JSEARCH_OPTIONS (RID_SVX_START + 840) +#define DLG_DOCUMENTLINK (RID_OFA_START + 124) +#define STR_LINKEDDOC_DOESNOTEXIST (RID_SVX_START + 1111) +#define STR_LINKEDDOC_NO_SYSTEM_FILE (RID_SVX_START + 1169) +#define STR_NAME_CONFLICT (RID_SVX_START + 1112) +#define RID_SVX_FONT_SUBSTITUTION (RID_SVX_START + 18) + +// treeopt +#define RID_SVXPAGE_COLOR (RID_SVX_START + 60) +#define RID_SVXPAGE_SSO (RID_SVX_START + 251) +#define OFA_TP_LANGUAGES_FOR_SET_DOCUMENT_LANGUAGE ( RID_OFA_START + 256 ) +#define RID_OFADLG_OPTIONS_TREE_PAGES (RID_OFA_START + 116) +#define RID_OFADLG_OPTIONS_TREE (RID_OFA_START + 115) +#define RID_IMGLIST_TREEOPT (RID_OFA_START + 174) +#define RID_IMGLIST_TREEOPT_HC (RID_OFA_START + 175) +#define RID_RIDER_SLL_SITE (RID_OFA_START + 100)//? +#define RID_RIDER_SLL_PERSONAL (RID_OFA_START + 101)//? +#define RID_OFADLG_OPTIONS_TREE_HINT (RID_OFA_START + 118)//? + +// options +#define RID_SVXDLG_WEBCONNECTION_INFO (RID_SVX_START + 301) +#define RID_SVXDLG_SECURITY_OPTIONS (RID_SVX_START + 300) +#define RID_SVXPAGE_ONLINEUPDATE (RID_SVX_START + 298) +#define OFA_TP_MEMORY (RID_OFA_START + 250) +#define RID_SVXPAGE_INET_SECURITY (RID_SVX_START + 200) +#define RID_SVXPAGE_INET_SEARCH (RID_SVX_START + 160) +#define RID_SVXPAGE_INET_PROXY (RID_SVX_START + 157) +#define RID_SVXPAGE_INET_MAIL (RID_SVX_START + 155) +#define RID_SVXPAGE_INET_MOZPLUGIN (RID_SVX_START + 2161) +#define RID_OFAPAGE_HTMLOPT (RID_OFA_START + 100) +#define OFA_TP_LANGUAGES (RID_OFA_START + 205) +#define OFA_TP_MISC (RID_OFA_START + 200) +#define OFA_TP_VIEW (RID_OFA_START + 202) +#define RID_OFAPAGE_MSFILTEROPT (RID_OFA_START + 120) +#define RID_OFAPAGE_MSFILTEROPT2 (RID_OFA_START + 121) +#define RID_OFAPAGE_SMARTTAG_OPTIONS (RID_OFA_START + 125) +#define RID_SVXPAGE_OPTIONS_CTL (RID_SVX_START + 252) +#define RID_SVXPAGE_OPTIONS_JAVA (RID_SVX_START + 253) +#define RID_SVXPAGE_ACCESSIBILITYCONFIG (RID_SVX_START + 250) +#define RID_SVXPAGE_ASIAN_LAYOUT (RID_SVX_START + 246) +#define RID_OPTPAGE_CHART_DEFCOLORS (RID_SVX_START + 299) +#define RID_SVXPAGE_COLORCONFIG (RID_SVX_START + 249) +#define RID_SVXQB_DELETE_COLOR_CONFIG (RID_SVX_START + 324) +#define RID_SVXSTR_COLOR_CONFIG_SAVE1 (RID_SVX_START + 853) +#define RID_SVXSTR_COLOR_CONFIG_SAVE2 (RID_SVX_START + 854) +#define RID_SVXSTR_COLOR_CONFIG_DELETE (RID_SVX_START + 855) +#define RID_SVXSTR_OPT_DOUBLE_DICTS (RID_SVX_START + 320) +#define RID_SVX_MSGBOX_LANGUAGE_RESTART ( RID_SVX_START + 2 ) +#define RID_SVXERR_OPT_PROXYPORTS (RID_SVX_START + 224) +#define RID_SVXDLG_OPT_JAVASCRIPT_DISABLE (RID_SVX_START + 225) +#define RID_SVXDLG_JAVA_PARAMETER (RID_SVX_START + 254) +#define RID_SVXDLG_JAVA_CLASSPATH (RID_SVX_START + 255) +#define RID_SVXERR_JRE_NOT_RECOGNIZED (RID_SVX_START + 256) +#define RID_SVXERR_JRE_FAILED_VERSION (RID_SVX_START + 257) +#define RID_SVX_MSGBOX_JAVA_RESTART ( RID_SVX_START + 0 ) +#define RID_SVX_MSGBOX_JAVA_RESTART2 ( RID_SVX_START + 1 ) +#define RID_SVXDLG_LNG_ED_NUM_PREBREAK (RID_SVX_START + 830) +#define RID_SVXDLG_EDIT_MODULES (RID_SVX_START + 831) +#define RID_SVXSTR_PATH_NAME_START (RID_SVX_START + 1003) +#define RID_SVXDLG_FILTER_WARNING (RID_SVX_START + 248) +#define RID_SVXBMP_LOCK (RID_SVX_START + 118) +#define RID_SVXBMP_LOCK_HC (RID_SVX_START + 119) +#define RID_SVXSTR_READONLY_CONFIG_TIP (RID_SVX_START + 1026) +#define RID_SVXQB_CHANGEDATA (RID_SVX_START + 214) //? +#define RID_SVXERR_OPT_DOUBLEPATHS (RID_SVX_START + 208) //? +#define RID_SVXSTR_KEY_AUTOCORRECT_DIR (RID_SVX_START + 1004) //? +#define RID_SVXSTR_KEY_DICTIONARY_PATH (RID_SVX_START + 1010)//? +#define RID_SVXSTR_KEY_LINGUISTIC_DIR (RID_SVX_START + 1016)//? +#define RID_SVXSTR_KEY_USERCONFIG_PATH (RID_SVX_START + 1023)//? +#define RID_SVXSTR_KEY_FILTER_PATH (RID_SVX_START + 1012)//? +#define RID_SVXSTR_KEY_ADDINS_PATH (RID_SVX_START + 1003)//? +#define RID_SVXSTR_KEY_FAVORITES_DIR (RID_SVX_START + 1011)//? +#define RID_SVXSTR_KEY_PLUGINS_PATH (RID_SVX_START + 1019)//? +#define RID_SVXSTR_KEY_TEMP_PATH (RID_SVX_START + 1021)//? +#define RID_SVXSTR_KEY_STORAGE_DIR (RID_SVX_START + 1020)//? +#define RID_SVXSTR_KEY_GALLERY_DIR (RID_SVX_START + 1013)//? +#define RID_SVXSTR_KEY_HELP_DIR (RID_SVX_START + 1015)//? +#define RID_SVXSTR_KEY_GLOSSARY_PATH (RID_SVX_START + 1005)//? +#define RID_SVXSTR_KEY_TEMPLATE_PATH (RID_SVX_START + 1022)//? +#define RID_SVXSTR_KEY_MODULES_PATH (RID_SVX_START + 1017)//? +#define RID_SVXSTR_KEY_BACKUP_PATH (RID_SVX_START + 1006)//? +#define RID_SVXSTR_KEY_PALETTE_PATH (RID_SVX_START + 1018)//? +#define RID_SVXSTR_KEY_CONFIG_DIR (RID_SVX_START + 1009)//? +#define RID_SVXSTR_KEY_WORK_PATH (RID_SVX_START + 1024)//? +#define RID_SVXSTR_KEY_GRAPHICS_PATH (RID_SVX_START + 1014)//? +#define RID_SVXSTR_KEY_BASIC_PATH (RID_SVX_START + 1007)//? +#define RID_SVXSTR_KEY_BITMAP_PATH (RID_SVX_START + 1008)//? +#define RID_SVXSTR_KEY_USERDICTIONARY_DIR (RID_SVX_START + 1025)//? + +// dialogs +#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) +#define RID_SVXBMP_HLINETTP_H (RID_SVX_START + 272) +#define RID_SVXBMP_HLMAILTP_H (RID_SVX_START + 273) +#define RID_SVXBMP_HLDOCTP_H (RID_SVX_START + 274) +#define RID_SVXBMP_HLDOCNTP_H (RID_SVX_START + 275) +#define RID_SVXBMP_HLINETTP (RID_SVX_START + 556) +#define RID_SVXBMP_HLMAILTP (RID_SVX_START + 557) +#define RID_SVXBMP_HLDOCTP (RID_SVX_START + 558) +#define RID_SVXBMP_HLDOCNTP (RID_SVX_START + 559) +#define RID_SVXPAGE_HYPERLINK_INTERNET (RID_SVX_START + 228) +#define RID_SVXPAGE_HYPERLINK_MAIL (RID_SVX_START + 229) +#define RID_SVXPAGE_HYPERLINK_DOCUMENT (RID_SVX_START + 230) +#define RID_SVXPAGE_HYPERLINK_NEWDOCUMENT (RID_SVX_START + 231) +#define RID_SVXSTR_HYPERDLG_HLINETTP (RID_SVX_START + 581) +#define RID_SVXSTR_HYPERDLG_HLINETTP_HELP (RID_SVX_START + 582) +#define RID_SVXSTR_HYPERDLG_HLMAILTP (RID_SVX_START + 583) +#define RID_SVXSTR_HYPERDLG_HLMAILTP_HELP (RID_SVX_START + 584) +#define RID_SVXSTR_HYPERDLG_HLDOCTP (RID_SVX_START + 585) +#define RID_SVXSTR_HYPERDLG_HLDOCTP_HELP (RID_SVX_START + 586) +#define RID_SVXSTR_HYPERDLG_HLDOCNTP (RID_SVX_START + 587) +#define RID_SVXSTR_HYPERDLG_HLDOCNTP_HELP (RID_SVX_START + 588) +#define RID_SVXSTR_HYPDLG_APPLYBUT (RID_SVX_START + 548) +#define RID_SVXSTR_HYPDLG_CLOSEBUT (RID_SVX_START + 549) +#define RID_SVXSTR_HYPDLG_NOVALIDFILENAME (RID_SVX_START + 553) +#define RID_SVXSTR_HYPERDLG_QUERYOVERWRITE (RID_SVX_START + 815) +#define RID_SVXSTR_HYPDLG_ERR_LERR_NOENTRIES (RID_SVX_START + 800) +#define RID_SVXSTR_HYPDLG_ERR_LERR_DOCNOTOPEN (RID_SVX_START + 801) +#define RID_SVXFLOAT_HYPERLINK_MARKWND (RID_SVX_START + 232) +#define RID_SVXSTR_HYPDLG_MACROACT1 (RID_SVX_START + 550) +#define RID_SVXSTR_HYPDLG_MACROACT2 (RID_SVX_START + 551) +#define RID_SVXSTR_HYPDLG_MACROACT3 (RID_SVX_START + 552) +#define RID_SVXSTR_HYPERDLG_FORM_BUTTON (RID_SVX_START + 813) +#define RID_SVXSTR_HYPERDLG_FROM_TEXT (RID_SVX_START + 814) + +// imap dialog +#define RID_SVX_IMAPDLG_START (RID_SVX_START + 100) +#define RID_SVXDLG_IMAPURL (RID_SVX_IMAPDLG_START + 2) + +// name dialog +#define RID_SVXDLG_NAME (RID_SVX_START + 62) +#define RID_SVXDLG_MESSBOX (RID_SVX_START + 63) +#define RID_SVXDLG_OBJECT_NAME (RID_SVX_START + 64) +#define RID_SVXDLG_OBJECT_TITLE_DESC (RID_SVX_START + 67) + +// hangulhanja +#define RID_SVX_MDLG_HANGULHANJA (RID_SVX_START + 1 ) +#define RID_SVX_MDLG_HANGULHANJA_OPT ( RID_SVX_START + 4 ) +#define RID_SVX_MDLG_HANGULHANJA_EDIT ( RID_SVX_START + 5 ) +#define RID_SVX_MDLG_HANGULHANJA_NEWDICT ( RID_SVX_START + 6 ) + +// icon choice +#define RID_SVXSTR_ICONCHOICEDLG_RESETBUT (RID_SVX_START + 580) + +// insert rows&cols +#define DLG_INS_ROW_COL (RID_SVX_START + 156) + +// SvxMultiFileDialog +#define RID_SVXSTR_FILE_TITLE (RID_SVX_START + 482) +#define RID_SVXSTR_FILE_HEADLINE (RID_SVX_START + 483) +#define RID_SVXSTR_ARCHIVE_TITLE (RID_SVX_START + 484) +#define RID_SVXSTR_ARCHIVE_HEADLINE (RID_SVX_START + 485) +#define RID_SVXSTR_MULTIFILE_DBL_ERR (RID_SVX_START + 486) + +// password to open/modify dialog +#define RID_DLG_PASSWORD_TO_OPEN_MODIFY (RID_SVX_START + 500) + +// multi path dialog +#define RID_SVXDLG_MULTIPATH (RID_SVX_START + 201) +#define RID_MULTIPATH_DBL_ERR (RID_SVX_START + 207) + +// new table dialog +#define RID_SVX_NEWTABLE_DLG ( RID_SVX_START + 44 ) + +// script organizer +#define RID_DLG_SCRIPTORGANIZER (RID_SVX_START + 258) +#define RID_DLG_NEWLIB (RID_SVX_START + 290) +#define RID_SVXSTR_DELQUERY (RID_SVX_START + 1027) +#define RID_SVXSTR_DELQUERY_TITLE (RID_SVX_START + 1028) +#define RID_SVXSTR_DELFAILED (RID_SVX_START + 1029) +#define RID_SVXSTR_DELFAILEDPERM (RID_SVX_START + 1030) +#define RID_SVXSTR_DELFAILED_TITLE (RID_SVX_START + 1031) +#define RID_SVXSTR_CREATEFAILED (RID_SVX_START + 1032) +#define RID_SVXSTR_CREATEFAILEDPERM (RID_SVX_START + 1033) +#define RID_SVXSTR_CREATEFAILEDDUP (RID_SVX_START + 1034) +#define RID_SVXSTR_CREATEFAILED_TITLE (RID_SVX_START + 1035) +#define RID_SVXSTR_RENAMEFAILED (RID_SVX_START + 1036) +#define RID_SVXSTR_RENAMEFAILEDPERM (RID_SVX_START + 1037) +#define RID_SVXSTR_RENAMEFAILED_TITLE (RID_SVX_START + 1038) +#define RID_SVXSTR_ERROR_TITLE (RID_SVX_START + 1100) +#define RID_SVXSTR_ERROR_LANG_NOT_SUPPORTED (RID_SVX_START + 1101) +#define RID_SVXSTR_ERROR_RUNNING (RID_SVX_START + 1102) +#define RID_SVXSTR_EXCEPTION_RUNNING (RID_SVX_START + 1103) +#define RID_SVXSTR_ERROR_AT_LINE (RID_SVX_START + 1104) +#define RID_SVXSTR_EXCEPTION_AT_LINE (RID_SVX_START + 1105) +#define RID_SVXSTR_FRAMEWORK_ERROR_RUNNING (RID_SVX_START + 1106) +#define RID_SVXSTR_FRAMEWORK_ERROR_AT_LINE (RID_SVX_START + 1107) +#define RID_SVXSTR_ERROR_TYPE_LABEL (RID_SVX_START + 1108) +#define RID_SVXSTR_ERROR_MESSAGE_LABEL (RID_SVX_START + 1109) + +// spell check dialog +#define RID_SVXDLG_SPELLCHECK (RID_SVX_START + 32) + +// split cells +#define RID_SVX_SPLITCELLDLG ( RID_SVX_START + 43 ) + +// searching +#define RID_SVXDLG_SEARCHSIMILARITY (RID_SVX_START + 23) + +// customize + +#define RID_SVXDLG_CUSTOMIZE (RID_SVX_START + 291) +#define RID_SVXPAGE_MENUS (RID_SVX_START + 292) +#define RID_SVXPAGE_KEYBOARD (RID_SVX_START + 293) +#define RID_SVXPAGE_TOOLBARS (RID_SVX_START + 294) +#define RID_SVXPAGE_EVENTS (RID_SVX_START + 295) +#define RID_SVXPAGE_CONFIGGROUPBOX (RID_SVX_START + 304) +#define RID_SVXDLG_ASSIGNCOMPONENT (RID_SVX_START + 297) +#define RID_DLG_SCRIPTSELECTOR (RID_SVX_START + 259) +#define RID_SVXSTR_NEW_MENU (RID_SVX_START + 1039) +#define RID_SVXSTR_NEW_TOOLBAR (RID_SVX_START + 1040) +#define RID_SVXSTR_MOVE_MENU (RID_SVX_START + 1041) +#define RID_SVXSTR_ADD_SUBMENU (RID_SVX_START + 1048) +#define RID_SVXSTR_SUBMENU_NAME (RID_SVX_START + 1049) +#define RID_SVXSTR_MENU_ADDCOMMANDS_DESCRIPTION (RID_SVX_START + 1050) +#define RID_SVXSTR_IMPORT_ICON_ERROR (RID_SVX_START + 1117) +#define RID_SVXSTR_DELETE_ICON_CONFIRM (RID_SVX_START + 1163) //added for issue73355 +#define RID_SVXSTR_REPLACE_ICON_WARNING (RID_SVX_START + 1164) //added for issue73355 +#define RID_SVXSTR_REPLACE_ICON_CONFIRM (RID_SVX_START + 1165) //added for issue73355 +#define RID_SVXSTR_YESTOALL (RID_SVX_START + 1166) //added for issue73355 +#define RID_SVXSTR_PRODUCTNAME_TOOLBARS (RID_SVX_START + 1042) +#define RID_SVXSTR_TOOLBAR (RID_SVX_START + 1043) +#define RID_SVXSTR_TOOLBAR_CONTENT (RID_SVX_START + 1044) +#define RID_SVXSTR_COMMANDS (RID_SVX_START + 1045) +#define RID_SVXSTR_COMMAND (RID_SVX_START + 1046) +#define RID_SVXSTR_TOOLBAR_NAME (RID_SVX_START + 1047) +#define RID_SVXSTR_CONFIRM_MENU_RESET (RID_SVX_START + 1115) +#define RID_SVXSTR_CONFIRM_TOOLBAR_RESET (RID_SVX_START + 1116) +#define RID_SVXSTR_LABEL_NEW_NAME (RID_SVX_START + 1135) +#define RID_SVXSTR_RENAME_MENU (RID_SVX_START + 1136) +#define RID_SVXSTR_RENAME_TOOLBAR (RID_SVX_START + 1137) +#define RID_SVXSTR_EVENT_STARTAPP (RID_SVX_START + 1051) +#define RID_SVXSTR_EVENT_CLOSEAPP (RID_SVX_START + 1052) +#define RID_SVXSTR_EVENT_NEWDOC (RID_SVX_START + 1053) +#define RID_SVXSTR_EVENT_CLOSEDOC (RID_SVX_START + 1054) +#define RID_SVXSTR_EVENT_PREPARECLOSEDOC (RID_SVX_START + 1055) +#define RID_SVXSTR_EVENT_OPENDOC (RID_SVX_START + 1056) +#define RID_SVXSTR_EVENT_SAVEDOC (RID_SVX_START + 1057) +#define RID_SVXSTR_EVENT_SAVEASDOC (RID_SVX_START + 1058) +#define RID_SVXSTR_EVENT_SAVEDOCDONE (RID_SVX_START + 1059) +#define RID_SVXSTR_EVENT_SAVEASDOCDONE (RID_SVX_START + 1060) +#define RID_SVXSTR_EVENT_ACTIVATEDOC (RID_SVX_START + 1061) +#define RID_SVXSTR_EVENT_DEACTIVATEDOC (RID_SVX_START + 1062) +#define RID_SVXSTR_EVENT_PRINTDOC (RID_SVX_START + 1063) +#define RID_SVXSTR_EVENT_MODIFYCHANGED (RID_SVX_START + 1064) +#define RID_SVXSTR_EVENT_MAILMERGE (RID_SVX_START + 1065) +#define RID_SVXSTR_EVENT_PAGECOUNTCHANGE (RID_SVX_START + 1066) +#define RID_SVXSTR_EVENT_APPROVEACTIONPERFORMED (RID_SVX_START + 1067) +#define RID_SVXSTR_EVENT_ACTIONPERFORMED (RID_SVX_START + 1068) +#define RID_SVXSTR_EVENT_CHANGED (RID_SVX_START + 1069) +#define RID_SVXSTR_EVENT_TEXTCHANGED (RID_SVX_START + 1070) +#define RID_SVXSTR_EVENT_ITEMSTATECHANGED (RID_SVX_START + 1071) +#define RID_SVXSTR_EVENT_FOCUSGAINED (RID_SVX_START + 1072) +#define RID_SVXSTR_EVENT_FOCUSLOST (RID_SVX_START + 1073) +#define RID_SVXSTR_EVENT_KEYTYPED (RID_SVX_START + 1074) +#define RID_SVXSTR_EVENT_KEYUP (RID_SVX_START + 1075) +#define RID_SVXSTR_EVENT_MOUSEENTERED (RID_SVX_START + 1076) +#define RID_SVXSTR_EVENT_MOUSEDRAGGED (RID_SVX_START + 1077) +#define RID_SVXSTR_EVENT_MOUSEMOVED (RID_SVX_START + 1078) +#define RID_SVXSTR_EVENT_MOUSEPRESSED (RID_SVX_START + 1079) +#define RID_SVXSTR_EVENT_MOUSERELEASED (RID_SVX_START + 1080) +#define RID_SVXSTR_EVENT_MOUSEEXITED (RID_SVX_START + 1081) +#define RID_SVXSTR_EVENT_APPROVERESETTED (RID_SVX_START + 1082) +#define RID_SVXSTR_EVENT_SUBMITTED (RID_SVX_START + 1083) +#define RID_SVXSTR_EVENT_BEFOREUPDATE (RID_SVX_START + 1084) +#define RID_SVXSTR_EVENT_AFTERUPDATE (RID_SVX_START + 1085) +#define RID_SVXSTR_EVENT_LOADED (RID_SVX_START + 1086) +#define RID_SVXSTR_EVENT_RELOADING (RID_SVX_START + 1087) +#define RID_SVXSTR_EVENT_RELOADED (RID_SVX_START + 1088) +#define RID_SVXSTR_EVENT_UNLOADING (RID_SVX_START + 1089) +#define RID_SVXSTR_EVENT_UNLOADED (RID_SVX_START + 1090) +#define RID_SVXSTR_EVENT_CONFIRMDELETE (RID_SVX_START + 1091) +#define RID_SVXSTR_EVENT_APPROVEROWCHANGE (RID_SVX_START + 1092) +#define RID_SVXSTR_EVENT_ROWCHANGE (RID_SVX_START + 1093) +#define RID_SVXSTR_EVENT_POSITIONING (RID_SVX_START + 1094) +#define RID_SVXSTR_EVENT_POSITIONED (RID_SVX_START + 1095) +#define RID_SVXSTR_EVENT_APPROVEPARAMETER (RID_SVX_START + 1096) +#define RID_SVXSTR_EVENT_ERROROCCURED (RID_SVX_START + 1097) +#define RID_SVXSTR_EVENT_ADJUSTMENTVALUECHANGED (RID_SVX_START + 1098) +#define RID_SVXSTR_EVENT_RESETTED (RID_SVX_START + 1099) +#define RID_SVXSTR_EVENT_SUBCOMPONENT_OPENED (RID_SVX_START + 1170) +#define RID_SVXSTR_EVENT_SUBCOMPONENT_CLOSED (RID_SVX_START + 1171) +#define RID_SVXSTR_EVENT_CREATEDOC (RID_SVX_START + 1172) +#define RID_SVXSTR_EVENT_LOADDOCFINISHED (RID_SVX_START + 1173) +#define RID_SVXSTR_EVENT_SAVEDOCFAILED (RID_SVX_START + 1174) +#define RID_SVXSTR_EVENT_SAVEASDOCFAILED (RID_SVX_START + 1175) +#define RID_SVXSTR_EVENT_COPYTODOC (RID_SVX_START + 1176) +#define RID_SVXSTR_EVENT_COPYTODOCDONE (RID_SVX_START + 1177) +#define RID_SVXSTR_EVENT_COPYTODOCFAILED (RID_SVX_START + 1178) +#define RID_SVXSTR_EVENT_VIEWCREATED (RID_SVX_START + 1179) +#define RID_SVXSTR_EVENT_PREPARECLOSEVIEW (RID_SVX_START + 1180) +#define RID_SVXSTR_EVENT_CLOSEVIEW (RID_SVX_START + 1181) +#define RID_SVXSTR_EVENT_TITLECHANGED (RID_SVX_START + 1182) +#define RID_SVXSTR_EVENT_MODECHANGED (RID_SVX_START + 1183) +#define RID_SVXSTR_EVENT_VISAREACHANGED (RID_SVX_START + 1184) +#define RID_SVXSTR_EVENT_STORAGECHANGED (RID_SVX_START + 1185) +#define RID_SVXSTR_EVENT_MAILMERGE_END (RID_SVX_START + 1186) +#define RID_SVXSTR_EVENT_FIELDMERGE (RID_SVX_START + 1187) +#define RID_SVXSTR_EVENT_FIELDMERGE_FINISHED (RID_SVX_START + 1188) +#define RID_SVXSTR_EVENT_LAYOUT_FINISHED (RID_SVX_START + 1189) + +// For now, keep new IDs unique only within cui. +// Later, cui should perhaps get an own range of IDs. +#define RID_SVXSTR_EVENT_SELECTIONCHANGED (RID_SVX_START + 1190) +#define RID_SVXSTR_EVENT_DOUBLECLICK (RID_SVX_START + 1191) +#define RID_SVXSTR_EVENT_RIGHTCLICK (RID_SVX_START + 1192) +#define RID_SVXSTR_EVENT_CALCULATE (RID_SVX_START + 1193) +#define RID_SVXSTR_EVENT_CONTENTCHANGED (RID_SVX_START + 1194) + +#endif diff --git a/cui/source/inc/cuisrchdlg.hxx b/cui/source/inc/cuisrchdlg.hxx new file mode 100644 index 000000000000..d1b835cd1966 --- /dev/null +++ b/cui/source/inc/cuisrchdlg.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _CUI_SRCHDLG_HXX +#define _CUI_SRCHDLG_HXX + +// include --------------------------------------------------------------- + + +#include <svtools/stdctrl.hxx> +#include <vcl/combobox.hxx> +#include <vcl/edit.hxx> +#include <vcl/lstbox.hxx> +#include <vcl/button.hxx> +#include <vcl/group.hxx> +#include <vcl/fixed.hxx> +#include <vcl/dialog.hxx> +#include <sfx2/childwin.hxx> +#include <sfx2/basedlgs.hxx> +#include <svl/svarray.hxx> +#define _SVSTDARR_STRINGSDTOR +#include <svl/svstdarr.hxx> +#include <svtools/svmedit.hxx> +#include <svl/srchdefs.hxx> + +class SvxJSearchOptionsPage; + +class SvxJSearchOptionsDialog : public SfxSingleTabDialog +{ + INT32 nInitialTlFlags; + SvxJSearchOptionsPage *pPage; + + // disallow copy-constructor and assignment-operator for now + SvxJSearchOptionsDialog( const SvxJSearchOptionsDialog & ); + SvxJSearchOptionsDialog & operator == ( const SvxJSearchOptionsDialog & ); + +public: + SvxJSearchOptionsDialog( Window *pParent, + const SfxItemSet& rOptionsSet, + INT32 nInitialFlags ); + virtual ~SvxJSearchOptionsDialog(); + + // Window + virtual void Activate(); + + INT32 GetTransliterationFlags() const; +}; + +#endif diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx new file mode 100644 index 000000000000..c2ad3f7cc4a3 --- /dev/null +++ b/cui/source/inc/cuitabarea.hxx @@ -0,0 +1,802 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _CUI_TAB_AREA_HXX +#define _CUI_TAB_AREA_HXX + +// include --------------------------------------------------------------- + +#include <svx/tabarea.hxx> + +/************************************************************************* +|* +|* Fl"achen-Tab-Dialog +|* +\************************************************************************/ + +class SvxAreaTabDialog : public SfxTabDialog +{ +private: + SdrModel* mpDrawModel; +// const SdrView* mpView; + + XColorTable* mpColorTab; + XColorTable* mpNewColorTab; + XGradientList* mpGradientList; + XGradientList* mpNewGradientList; + XHatchList* mpHatchingList; + XHatchList* mpNewHatchingList; + XBitmapList* mpBitmapList; + XBitmapList* mpNewBitmapList; + + const SfxItemSet& mrOutAttrs; + + ChangeType mnColorTableState; + ChangeType mnBitmapListState; + ChangeType mnGradientListState; + ChangeType mnHatchingListState; + + USHORT mnPageType; + USHORT mnDlgType; + USHORT mnPos; + BOOL mbAreaTP; + BOOL mbDeleteColorTable; + + virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + +protected: + virtual short Ok(); +#ifdef _SVX_TABAREA_CXX + DECL_LINK( CancelHdlImpl, void * ); + void SavePalettes(); +#endif + +public: + SvxAreaTabDialog( Window* pParent, + const SfxItemSet* pAttr, SdrModel* pModel, + const SdrView* pSdrView = NULL ); + ~SvxAreaTabDialog(); + + void SetNewColorTable( XColorTable* pColTab ) + { mpNewColorTab = pColTab; } + XColorTable* GetNewColorTable() const { return mpNewColorTab; } + const XColorTable* GetColorTable() const { return mpColorTab; } + + void SetNewGradientList( XGradientList* pGrdLst) + { mpNewGradientList = pGrdLst; } + XGradientList* GetNewGradientList() const + { return mpNewGradientList; } + const XGradientList* GetGradientList() const { return mpGradientList; } + + void SetNewHatchingList( XHatchList* pHtchLst) + { mpNewHatchingList = pHtchLst; } + XHatchList* GetNewHatchingList() const + { return mpNewHatchingList; } + const XHatchList* GetHatchingList() const { return mpHatchingList; } + + void SetNewBitmapList( XBitmapList* pBmpLst) + { mpNewBitmapList = pBmpLst; } + XBitmapList* GetNewBitmapList() const { return mpNewBitmapList; } + const XBitmapList* GetBitmapList() const { return mpBitmapList; } + + void DontDeleteColorTable() { mbDeleteColorTable = FALSE; } +}; + +/************************************************************************* +|* +|* Transparence-Tab-Page +|* +\************************************************************************/ + +class SvxTransparenceTabPage : public SvxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + + const SfxItemSet& rOutAttrs; + RECT_POINT eRP; + + //CHINA001 UINT16* pPageType; + //CHINA001 UINT16* pDlgType; + UINT16 nPageType; //add CHINA001 + UINT16 nDlgType; //add CHINA001 + + // main selection + FixedLine aFlProp; + RadioButton aRbtTransOff; + RadioButton aRbtTransLinear; + RadioButton aRbtTransGradient; + + // linear transparency + MetricField aMtrTransparent; + + // gradient transparency + FixedText aFtTrgrType; + ListBox aLbTrgrGradientType; + FixedText aFtTrgrCenterX; + MetricField aMtrTrgrCenterX; + FixedText aFtTrgrCenterY; + MetricField aMtrTrgrCenterY; + FixedText aFtTrgrAngle; + MetricField aMtrTrgrAngle; + FixedText aFtTrgrBorder; + MetricField aMtrTrgrBorder; + FixedText aFtTrgrStartValue; + MetricField aMtrTrgrStartValue; + FixedText aFtTrgrEndValue; + MetricField aMtrTrgrEndValue; + + // preview + SvxXRectPreview aCtlBitmapPreview; + SvxXRectPreview aCtlXRectPreview; + BOOL bBitmap; + + XOutdevItemPool* pXPool; + XFillAttrSetItem aXFillAttr; + SfxItemSet& rXFSet; + +#ifdef _SVX_TPAREA_CXX + DECL_LINK(ClickTransOffHdl_Impl, void * ); + DECL_LINK(ClickTransLinearHdl_Impl, void * ); + DECL_LINK(ClickTransGradientHdl_Impl, void * ); + DECL_LINK(ModifyTransparentHdl_Impl, void*); + DECL_LINK(ChangeTrgrTypeHdl_Impl, void*); + DECL_LINK(ModifiedTrgrHdl_Impl, void*); +#endif + + void ActivateLinear(BOOL bActivate); + void ActivateGradient(BOOL bActivate); + void SetControlState_Impl(XGradientStyle eXGS); + + BOOL InitPreview ( const SfxItemSet& rSet ); + void InvalidatePreview (BOOL bEnable = TRUE ); + +public: + SvxTransparenceTabPage(Window* pParent, const SfxItemSet& rInAttrs); + void Construct(); + + static SfxTabPage* Create(Window*, const SfxItemSet&); + static UINT16* GetRanges(); + + virtual BOOL FillItemSet(SfxItemSet&); + virtual void Reset(const SfxItemSet&); + virtual void ActivatePage(const SfxItemSet& rSet); + virtual int DeactivatePage(SfxItemSet* pSet); + virtual void PointChanged(Window* pWindow, RECT_POINT eRP); + + //CHINA001 void SetPageType(UINT16 *pInType) { pPageType = pInType; } + //CHINA001 void SetDlgType(UINT16* pInType) { pDlgType = pInType; } + void SetPageType(UINT16 nInType) { nPageType = nInType; } //add CHINA001 + void SetDlgType(UINT16 nInType) { nDlgType = nInType; }//add CHINA001 + virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001 +}; + +/************************************************************************* +|* +|* Fl"achen-Tab-Page +|* +\************************************************************************/ + +class SvxAreaTabPage : public SvxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + +private: + FixedLine aFlProp; + ListBox aTypeLB; + + ColorLB aLbColor; + GradientLB aLbGradient; + HatchingLB aLbHatching; + BitmapLB aLbBitmap; + SvxXRectPreview aCtlBitmapPreview; + + TriStateBox aTsbStepCount; + FixedLine aFlStepCount; + NumericField aNumFldStepCount; + + CheckBox aCbxHatchBckgrd; + ColorLB aLbHatchBckgrdColor; + + FixedLine aFlSize; + TriStateBox aTsbOriginal; + TriStateBox aTsbScale; + FixedText aFtXSize; + MetricField aMtrFldXSize; + FixedText aFtYSize; + MetricField aMtrFldYSize; + FixedLine aFlPosition; + SvxRectCtl aCtlPosition; + FixedText aFtXOffset; + MetricField aMtrFldXOffset; + FixedText aFtYOffset; + MetricField aMtrFldYOffset; + TriStateBox aTsbTile; + TriStateBox aTsbStretch; + FixedLine aFlOffset; + RadioButton aRbtRow; + RadioButton aRbtColumn; + MetricField aMtrFldOffset; + + SvxXRectPreview aCtlXRectPreview; + + const SfxItemSet& rOutAttrs; + RECT_POINT eRP; + + XColorTable* pColorTab; + XGradientList* pGradientList; + XHatchList* pHatchingList; + XBitmapList* pBitmapList; + + ChangeType* pnColorTableState; + ChangeType* pnBitmapListState; + ChangeType* pnGradientListState; + ChangeType* pnHatchingListState; + + //CHINA001 USHORT* pPageType; + //CHINA001 USHORT* pDlgType; + //CHINA001 USHORT* pPos; + UINT16 nPageType; //add CHINA001 + UINT16 nDlgType;//add CHINA001 + UINT16 nPos; //add CHINA001 + + BOOL* pbAreaTP; + + XOutdevItemPool* pXPool; + XFillAttrSetItem aXFillAttr; + SfxItemSet& rXFSet; + + SfxMapUnit ePoolUnit; + FieldUnit eFUnit; + +#ifdef _SVX_TPAREA_CXX + DECL_LINK( SelectDialogTypeHdl_Impl, ListBox * ); + DECL_LINK( ClickInvisibleHdl_Impl, void * ); + DECL_LINK( ClickColorHdl_Impl, void * ); + DECL_LINK( ModifyColorHdl_Impl, void * ); + DECL_LINK( ModifyHatchBckgrdColorHdl_Impl, void * ); + DECL_LINK( ClickGradientHdl_Impl, void * ); + DECL_LINK( ModifyGradientHdl_Impl, void * ); + DECL_LINK( ClickHatchingHdl_Impl, void * ); + DECL_LINK( ModifyHatchingHdl_Impl, void * ); + DECL_LINK( ToggleHatchBckgrdColorHdl_Impl, void * ); + DECL_LINK( ClickBitmapHdl_Impl, void * ); + DECL_LINK( ModifyBitmapHdl_Impl, void * ); +// DECL_LINK( ModifyTransparentHdl_Impl, void * ); + DECL_LINK( ModifyStepCountHdl_Impl, void * ); + DECL_LINK( ModifyTileHdl_Impl, void * ); + DECL_LINK( ClickScaleHdl_Impl, void * ); +#endif + +public: + SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ); + + void Construct(); + + static SfxTabPage* Create( Window*, const SfxItemSet& ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet & ); + virtual void ActivatePage( const SfxItemSet& rSet ); + virtual int DeactivatePage( SfxItemSet* pSet ); + virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); + + void SetColorTable( XColorTable* pColTab ) { pColorTab = pColTab; } + void SetGradientList( XGradientList* pGrdLst) + { pGradientList = pGrdLst; } + void SetHatchingList( XHatchList* pHtchLst) + { pHatchingList = pHtchLst; } + void SetBitmapList( XBitmapList* pBmpLst) { pBitmapList = pBmpLst; } + + //CHINA001 void SetPageType( USHORT* pInType ) { pPageType = pInType; } + void SetPageType( UINT16 nInType ) { nPageType = nInType; } //add CHINA001 + //CHINA001 void SetDlgType( USHORT* pInType ) { pDlgType = pInType; } + void SetDlgType( UINT16 nInType ) { nDlgType = nInType; }//add CHINA001 + //CHINA001 void SetPos( USHORT* pInPos ) { pPos = pInPos; } + void SetPos( UINT16 nInPos ) { nPos = nInPos; }//add CHINA001 + void SetAreaTP( BOOL* pIn ) { pbAreaTP = pIn; } + virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001 + void SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; } + void SetGrdChgd( ChangeType* pIn ) { pnGradientListState = pIn; } + void SetHtchChgd( ChangeType* pIn ) { pnHatchingListState = pIn; } + void SetBmpChgd( ChangeType* pIn ) { pnBitmapListState = pIn; } +}; + +/************************************************************************* +|* +|* Schatten-Tab-Page +|* +\************************************************************************/ + +class SvxShadowTabPage : public SvxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + +private: + FixedLine aFlProp; + TriStateBox aTsbShowShadow; + FixedText aFtPosition; + SvxRectCtl aCtlPosition; + FixedText aFtDistance; + MetricField aMtrDistance; + FixedText aFtShadowColor; + ColorLB aLbShadowColor; + FixedText aFtTransparent; + MetricField aMtrTransparent; + SvxXShadowPreview aCtlXRectPreview; + + const SfxItemSet& rOutAttrs; + RECT_POINT eRP; + + XColorTable* pColorTab; + ChangeType* pnColorTableState; + UINT16 nPageType; //add CHINA001 + UINT16 nDlgType; //add CHINA001 + USHORT* pPos; + BOOL* pbAreaTP; + + BOOL bDisable; + + XOutdevItemPool* pXPool; + XFillAttrSetItem aXFillAttr; + SfxItemSet& rXFSet; + SfxMapUnit ePoolUnit; + +#ifdef _SVX_TPSHADOW_CXX + DECL_LINK( ClickShadowHdl_Impl, void * ); + DECL_LINK( ModifyShadowHdl_Impl, void * ); +#endif + +public: + SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs ); + + void Construct(); + static SfxTabPage* Create( Window*, const SfxItemSet& ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet & ); + virtual void ActivatePage( const SfxItemSet& rSet ); + virtual int DeactivatePage( SfxItemSet* pSet ); + virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); + + void SetColorTable( XColorTable* pColTab ) { pColorTab = pColTab; } +//CHINA001 void SetPageType( USHORT* pInType ) { pPageType = pInType; } +//CHINA001 void SetDlgType( USHORT* pInType ) { pDlgType = pInType; } + void SetPageType( UINT16 nInType ) { nPageType = nInType; } //add CHINA001 + void SetDlgType( UINT16 nInType ) { nDlgType = nInType; } //add CHINA001 + void SetAreaTP( BOOL* pIn ) { pbAreaTP = pIn; } + void SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; } + virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001 + void DisablePage( BOOL bIn ) { bDisable = bIn; } +}; + +/************************************************************************* +|* +|* Farbverlauf-Tab-Page +|* +\************************************************************************/ + +class SvxGradientTabPage : public SfxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + +private: + FixedLine aFlProp; + FixedText aFtType; + ListBox aLbGradientType; + FixedText aFtCenterX; + MetricField aMtrCenterX; + FixedText aFtCenterY; + MetricField aMtrCenterY; + FixedText aFtAngle; + MetricField aMtrAngle; + FixedText aFtBorder; + MetricField aMtrBorder; + FixedText aFtColorFrom; + ColorLB aLbColorFrom; + MetricField aMtrColorFrom; + FixedText aFtColorTo; + ColorLB aLbColorTo; + MetricField aMtrColorTo; + GradientLB aLbGradients; + SvxXRectPreview aCtlPreview; + PushButton aBtnAdd; + PushButton aBtnModify; + PushButton aBtnDelete; + ImageButton aBtnLoad; + ImageButton aBtnSave; + + const SfxItemSet& rOutAttrs; + + XColorTable* pColorTab; + XGradientList* pGradientList; + + ChangeType* pnGradientListState; + ChangeType* pnColorTableState; + USHORT* pPageType; + USHORT* pDlgType; + USHORT* pPos; + BOOL* pbAreaTP; + + XOutdevItemPool* pXPool; + XFillStyleItem aXFStyleItem; + XFillGradientItem aXGradientItem; + XFillAttrSetItem aXFillAttr; + SfxItemSet& rXFSet; + +#ifdef _SVX_TPGRADNT_CXX + DECL_LINK( ClickAddHdl_Impl, void * ); + DECL_LINK( ClickModifyHdl_Impl, void * ); + DECL_LINK( ClickDeleteHdl_Impl, void * ); + DECL_LINK( ChangeGradientHdl_Impl, void * ); + DECL_LINK( ModifiedHdl_Impl, void * ); + DECL_LINK( ClickLoadHdl_Impl, void * ); + DECL_LINK( ClickSaveHdl_Impl, void * ); + + long CheckChanges_Impl(); + void SetControlState_Impl( XGradientStyle eXGS ); +#endif + +public: + SvxGradientTabPage( Window* pParent, const SfxItemSet& rInAttrs ); + + void Construct(); + + static SfxTabPage* Create( Window*, const SfxItemSet& ); + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet & ); + + virtual void ActivatePage( const SfxItemSet& rSet ); + virtual int DeactivatePage( SfxItemSet* pSet ); + + void SetColorTable( XColorTable* pColTab ) { pColorTab = pColTab; } + void SetGradientList( XGradientList* pGrdLst) + { pGradientList = pGrdLst; } + + void SetPageType( USHORT* pInType ) { pPageType = pInType; } + void SetDlgType( USHORT* pInType ) { pDlgType = pInType; } + void SetPos( USHORT* pInPos ) { pPos = pInPos; } + void SetAreaTP( BOOL* pIn ) { pbAreaTP = pIn; } + + void SetGrdChgd( ChangeType* pIn ) { pnGradientListState = pIn; } + void SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; } +}; + +/************************************************************************* +|* +|* Schraffuren-Tab-Page +|* +\************************************************************************/ + +class SvxHatchTabPage : public SvxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + +private: + FixedText aFtDistance; + MetricField aMtrDistance; + FixedText aFtAngle; + MetricField aMtrAngle; + SvxRectCtl aCtlAngle; + FixedLine aFlProp; + FixedText aFtLineType; + ListBox aLbLineType; + FixedText aFtLineColor; + ColorLB aLbLineColor; + HatchingLB aLbHatchings; + SvxXRectPreview aCtlPreview; + PushButton aBtnAdd; + PushButton aBtnModify; + PushButton aBtnDelete; + ImageButton aBtnLoad; + ImageButton aBtnSave; + + const SfxItemSet& rOutAttrs; + RECT_POINT eRP; + + XColorTable* pColorTab; + XHatchList* pHatchingList; + + ChangeType* pnHatchingListState; + ChangeType* pnColorTableState; + USHORT* pPageType; + USHORT* pDlgType; + USHORT* pPos; + BOOL* pbAreaTP; + + XOutdevItemPool* pXPool; + XFillStyleItem aXFStyleItem; + XFillHatchItem aXHatchItem; + XFillAttrSetItem aXFillAttr; + SfxItemSet& rXFSet; + + SfxMapUnit ePoolUnit; + +#ifdef _SVX_TPHATCH_CXX + DECL_LINK( ChangeHatchHdl_Impl, void * ); + DECL_LINK( ModifiedHdl_Impl, void * ); + DECL_LINK( ClickAddHdl_Impl, void * ); + DECL_LINK( ClickModifyHdl_Impl, void * ); + DECL_LINK( ClickDeleteHdl_Impl, void * ); + DECL_LINK( ClickLoadHdl_Impl, void * ); + DECL_LINK( ClickSaveHdl_Impl, void * ); + + long CheckChanges_Impl(); +#endif + +public: + SvxHatchTabPage( Window* pParent, const SfxItemSet& rInAttrs ); + + void Construct(); + + static SfxTabPage* Create( Window*, const SfxItemSet& ); + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet & ); + + virtual void ActivatePage( const SfxItemSet& rSet ); + virtual int DeactivatePage( SfxItemSet* pSet ); + + virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); + + void SetColorTable( XColorTable* pColTab ) { pColorTab = pColTab; } + void SetHatchingList( XHatchList* pHtchLst) + { pHatchingList = pHtchLst; } + + void SetPageType( USHORT* pInType ) { pPageType = pInType; } + void SetDlgType( USHORT* pInType ) { pDlgType = pInType; } + void SetPos( USHORT* pInPos ) { pPos = pInPos; } + void SetAreaTP( BOOL* pIn ) { pbAreaTP = pIn; } + + void SetHtchChgd( ChangeType* pIn ) { pnHatchingListState = pIn; } + void SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; } + + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +}; + +/************************************************************************* +|* +|* Bitmap-Tab-Page +|* +\************************************************************************/ + +class SvxBitmapTabPage : public SvxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + +private: + SvxPixelCtl aCtlPixel; + FixedText aFtPixelEdit; + FixedText aFtColor; + ColorLB aLbColor; + FixedText aFtBackgroundColor; + ColorLB aLbBackgroundColor; + FixedText aLbBitmapsHidden; + BitmapLB aLbBitmaps; + FixedLine aFlProp; + SvxXRectPreview aCtlPreview; + PushButton aBtnAdd; + PushButton aBtnModify; + PushButton aBtnImport; + PushButton aBtnDelete; + ImageButton aBtnLoad; + ImageButton aBtnSave; + + SvxBitmapCtl aBitmapCtl; + + const SfxItemSet& rOutAttrs; + + XColorTable* pColorTab; + XBitmapList* pBitmapList; + + ChangeType* pnBitmapListState; + ChangeType* pnColorTableState; + USHORT* pPageType; + USHORT* pDlgType; + USHORT* pPos; + BOOL* pbAreaTP; + + BOOL bBmpChanged; + + XOutdevItemPool* pXPool; + XFillStyleItem aXFStyleItem; + XFillBitmapItem aXBitmapItem; + XFillAttrSetItem aXFillAttr; + SfxItemSet& rXFSet; + +#ifdef _SVX_TPBITMAP_CXX + DECL_LINK( ClickAddHdl_Impl, void * ); + DECL_LINK( ClickImportHdl_Impl, void * ); + DECL_LINK( ClickModifyHdl_Impl, void * ); + DECL_LINK( ClickDeleteHdl_Impl, void * ); + DECL_LINK( ChangeBitmapHdl_Impl, void * ); + DECL_LINK( ChangePixelColorHdl_Impl, void * ); + DECL_LINK( ChangeBackgrndColorHdl_Impl, void * ); + DECL_LINK( ClickLoadHdl_Impl, void * ); + DECL_LINK( ClickSaveHdl_Impl, void * ); + + long CheckChanges_Impl(); +#endif + +public: + SvxBitmapTabPage( Window* pParent, const SfxItemSet& rInAttrs ); + + void Construct(); + + static SfxTabPage* Create( Window*, const SfxItemSet& ); + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet & ); + + virtual void ActivatePage( const SfxItemSet& rSet ); + virtual int DeactivatePage( SfxItemSet* pSet ); + + virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); + + void SetColorTable( XColorTable* pColTab ) { pColorTab = pColTab; } + void SetBitmapList( XBitmapList* pBmpLst) { pBitmapList = pBmpLst; } + + void SetPageType( USHORT* pInType ) { pPageType = pInType; } + void SetDlgType( USHORT* pInType ) { pDlgType = pInType; } + void SetPos( USHORT* pInPos ) { pPos = pInPos; } + void SetAreaTP( BOOL* pIn ) { pbAreaTP = pIn; } + + void SetBmpChgd( ChangeType* pIn ) { pnBitmapListState = pIn; } + void SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; } + + /** Return a label that is associated with the given control. This + label is used to the determine the name for the control. + @param pLabeled + The control for which to return a label. + @return + Return a label control that provides a name for the specified + control. + */ + virtual Window* GetParentLabeledBy( const Window* pLabeled ) const; +}; + +/************************************************************************* +|* +|* Farben-Tab-Page +|* +\************************************************************************/ + +class SvxColorTabPage : public SfxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + +private: + FixedLine aFlProp; + FixedText aFtName; + Edit aEdtName; + FixedText aFtColor; + ColorLB aLbColor; + + FixedText aTableNameFT; + ValueSet aValSetColorTable; + + SvxXRectPreview aCtlPreviewOld; + SvxXRectPreview aCtlPreviewNew; + + ListBox aLbColorModel; + FixedText aFtColorModel1; + MetricField aMtrFldColorModel1; + FixedText aFtColorModel2; + MetricField aMtrFldColorModel2; + FixedText aFtColorModel3; + MetricField aMtrFldColorModel3; + + FixedText aFtColorModel4; + MetricField aMtrFldColorModel4; + + PushButton aBtnAdd; + PushButton aBtnModify; + PushButton aBtnWorkOn; + PushButton aBtnDelete; + ImageButton aBtnLoad; + ImageButton aBtnSave; + + const SfxItemSet& rOutAttrs; + + XColorTable* pColorTab; + + ChangeType* pnColorTableState; + USHORT* pPageType; + USHORT* pDlgType; + USHORT* pPos; + BOOL* pbAreaTP; + BOOL bDeleteColorTable; + + XOutdevItemPool* pXPool; + XFillStyleItem aXFStyleItem; + XFillColorItem aXFillColorItem; + XFillAttrSetItem aXFillAttr; + SfxItemSet& rXFSet; + + ColorModel eCM; + + Color aAktuellColor; + +#ifdef _SVX_TPCOLOR_CXX + void ConvertColorValues (Color& rColor, ColorModel eModell); + void RgbToCmyk_Impl( Color& rColor, USHORT& rK ); + void CmykToRgb_Impl( Color& rColor, const USHORT nKey ); + USHORT ColorToPercent_Impl( USHORT nColor ); + USHORT PercentToColor_Impl( USHORT nPercent ); + + void FillValueSet_Impl( ValueSet& rVs ); + //----------------------------------------------------------------------------------------------------- + DECL_LINK( ClickAddHdl_Impl, void * ); // Button 'Hinzufuegen' + DECL_LINK( ClickModifyHdl_Impl, void * ); // Button 'Aendern' + DECL_LINK( ClickDeleteHdl_Impl, void * ); // Button 'loeschen' + DECL_LINK( ClickWorkOnHdl_Impl, void * ); // Button 'Bearbeiten' + + DECL_LINK( SelectColorLBHdl_Impl, void * ); // Farbe aus Listbox auswhlen + DECL_LINK( SelectValSetHdl_Impl, void * ); // Farbe aus Farbpalette (links) auswhlen + DECL_LINK( SelectColorModelHdl_Impl, void * ); // Auswahl Listbox 'Farbmodell' + long ChangeColorHdl_Impl( void* p ); + DECL_LINK( ModifiedHdl_Impl, void * ); // Inhalt der Farbwerte-Felder wurde verndert + DECL_LINK( ClickLoadHdl_Impl, void * ); // Button 'Farbtabelle laden' + DECL_LINK( ClickSaveHdl_Impl, void * ); // Button 'Farbtabelle sichern' + + long CheckChanges_Impl(); +#endif + +public: + SvxColorTabPage( Window* pParent, const SfxItemSet& rInAttrs ); + + void Construct(); + + static SfxTabPage* Create( Window*, const SfxItemSet& ); + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet & ); + + virtual void ActivatePage( const SfxItemSet& rSet ); + virtual int DeactivatePage( SfxItemSet* pSet ); + + void SetColorTable( XColorTable* pColTab ) { pColorTab = pColTab; } + + void SetPageType( USHORT* pInType ) { pPageType = pInType; } + void SetDlgType( USHORT* pInType ) { pDlgType = pInType; } + void SetPos( USHORT* pInPos ) { pPos = pInPos; } + void SetAreaTP( BOOL* pIn ) { pbAreaTP = pIn; } + + void SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; } + + void SetDeleteColorTable( BOOL bIn ) { bDeleteColorTable = bIn; } + + virtual void FillUserData(); +}; + + +#endif // _CUI_TAB_AREA_HXX + diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx new file mode 100644 index 000000000000..933a71616039 --- /dev/null +++ b/cui/source/inc/cuitabline.hxx @@ -0,0 +1,430 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _CUI_TAB_LINE_HXX +#define _CUI_TAB_LINE_HXX + +// include --------------------------------------------------------------- +#include <svx/tabline.hxx> +/************************************************************************* +|* +|* Transform-Tab-Dialog +|* +\************************************************************************/ + +class SvxLineTabDialog : public SfxTabDialog +{ +private: + SdrModel* pDrawModel; + const SdrObject* pObj; + + const SfxItemSet& rOutAttrs; + + XColorTable* pColorTab; + XColorTable* mpNewColorTab; + XDashList* pDashList; + XDashList* pNewDashList; + XLineEndList* pLineEndList; + XLineEndList* pNewLineEndList; + BOOL bObjSelected; + + ChangeType nLineEndListState; + ChangeType nDashListState; + ChangeType mnColorTableState; + + USHORT nPageType; + USHORT nDlgType; + USHORT nPosDashLb; + USHORT nPosLineEndLb; + USHORT mnPos; + BOOL mbAreaTP; + BOOL mbDeleteColorTable; + + virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + +protected: + virtual short Ok(); +#ifdef _SVX_TABLINE_CXX + DECL_LINK( CancelHdlImpl, void * ); + void SavePalettes(); +#endif + +public: + SvxLineTabDialog( Window* pParent, const SfxItemSet* pAttr, + SdrModel* pModel, const SdrObject* pObj = NULL, + BOOL bHasObj = TRUE ); + ~SvxLineTabDialog(); + + void SetNewDashList( XDashList* pInLst) + { pNewDashList = pInLst; } + XDashList* GetNewDashList() const { return pNewDashList; } + const XDashList* GetDashList() const { return pDashList; } + + void SetNewLineEndList( XLineEndList* pInLst) + { pNewLineEndList = pInLst; } + XLineEndList* GetNewLineEndList() const { return pNewLineEndList; } + const XLineEndList* GetLineEndList() const { return pLineEndList; } + + void SetNewColorTable( XColorTable* pColTab ) { mpNewColorTab = pColTab; } + XColorTable* GetNewColorTable() const { return mpNewColorTab; } + const XColorTable* GetColorTable() const { return pColorTab; } +}; + +/************************************************************************* +|* +|* Linien-Tab-Page +|* +\************************************************************************/ + +class SvxLineTabPage : public SvxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; +private: + FixedText aFtLineStyle; + LineLB aLbLineStyle; + FixedText aFtColor; + ColorLB aLbColor; + FixedText aFtLineWidth; + MetricField aMtrLineWidth; + FixedText aFtTransparent; + MetricField aMtrTransparent; + FixedLine aFlLine; + FixedText aFtLineEndsStyle; + LineEndLB aLbStartStyle; + FixedText aFtLineEndsWidth; + MetricField aMtrStartWidth; + TriStateBox aTsbCenterStart; + LineEndLB aLbEndStyle; + MetricField aMtrEndWidth; + TriStateBox aTsbCenterEnd; + CheckBox aCbxSynchronize; + FixedLine aFlLineEnds; + SvxXLinePreview aCtlPreview; + FixedLine aFLSeparator; + + // #116827# + FixedLine maFLEdgeStyle; + FixedText maFTEdgeStyle; + LineEndLB maLBEdgeStyle; + + //#58425# Symbole auf einer Linie (z.B. StarChart) -> + SdrObjList* pSymbolList; //a list of symbols to be shown in menu. Symbol at position SID_ATTR_SYMBOLTYPE is to be shown in preview. The list position is to be used cyclic. + bool bNewSize; + Graphic aAutoSymbolGraphic; //a graphic to be displayed in the preview in case that an automatic symbol is choosen + long nNumMenuGalleryItems; + long nSymbolType; + SfxItemSet* pSymbolAttr; //attributes for the shown symbols; only necessary if not equal to line properties + FixedLine aFlSymbol; + MenuButton aSymbolMB; + FixedText aSymbolWidthFT; + MetricField aSymbolWidthMF; + FixedText aSymbolHeightFT; + MetricField aSymbolHeightMF; + CheckBox aSymbolRatioCB; + List aGrfNames; + List aGrfBrushItems; + String sNumCharFmtName; + BOOL bLastWidthModified; + Size aSymbolLastSize; + Graphic aSymbolGraphic; + Size aSymbolSize; + BOOL bSymbols; + + const SfxItemSet& rOutAttrs; + RECT_POINT eRP; + BOOL bObjSelected; + + XOutdevItemPool* pXPool; + XLineStyleItem aXLStyle; + XLineWidthItem aXWidth; + XLineDashItem aXDash; + XLineColorItem aXColor; + XLineAttrSetItem aXLineAttr; + SfxItemSet& rXLSet; + + XColorTable* pColorTab; + XDashList* pDashList; + XLineEndList* pLineEndList; + + ChangeType* pnLineEndListState; + ChangeType* pnDashListState; + ChangeType* pnColorTableState; + UINT16 nPageType; //add CHINA001 + UINT16 nDlgType; //add CHINA001 + USHORT* pPosDashLb; + USHORT* pPosLineEndLb; + + SfxMapUnit ePoolUnit; + + // #63083# + INT32 nActLineWidth; + + //Handler fr Gallery-Popup-Menue-Button + Size + DECL_LINK( GraphicHdl_Impl, MenuButton * ); + DECL_LINK( MenuCreateHdl_Impl, MenuButton * ); + DECL_STATIC_LINK( SvxLineTabPage, GraphicArrivedHdl_Impl, SvxBrushItem* ); + DECL_LINK( SizeHdl_Impl, MetricField * ); + DECL_LINK( RatioHdl_Impl, CheckBox * ); + // <- Symbole + +#ifdef _SVX_TPLINE_CXX + DECL_LINK( ClickInvisibleHdl_Impl, void * ); + DECL_LINK( ChangeStartHdl_Impl, void * ); + DECL_LINK( ChangeEndHdl_Impl, void * ); + DECL_LINK( ChangePreviewHdl_Impl, void * ); + DECL_LINK( ChangeTransparentHdl_Impl, void * ); + + // #116827# + DECL_LINK( ChangeEdgeStyleHdl_Impl, void * ); + + BOOL FillXLSet_Impl(); +#endif + + void FillListboxes(); +public: + + void ShowSymbolControls(BOOL bOn); + + SvxLineTabPage( Window* pParent, const SfxItemSet& rInAttrs ); + virtual ~SvxLineTabPage(); + + void Construct(); + + + static SfxTabPage* Create( Window*, const SfxItemSet& ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet& ); + + virtual void ActivatePage( const SfxItemSet& rSet ); + virtual int DeactivatePage( SfxItemSet* pSet ); + + virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); + + virtual void FillUserData(); + + void SetColorTable( XColorTable* pColTab ) { pColorTab = pColTab; } + void SetDashList( XDashList* pDshLst ) { pDashList = pDshLst; } + void SetLineEndList( XLineEndList* pLneEndLst) { pLineEndList = pLneEndLst; } + void SetObjSelected( BOOL bHasObj ) { bObjSelected = bHasObj; } + + void SetPageType( UINT16 nInType ) { nPageType = nInType; }//CHINA001 void SetPageType( USHORT* pInType ) { pPageType = pInType; } + void SetDlgType( UINT16 nInType ) { nDlgType = nInType; } //CHINA001 void SetDlgType( USHORT* pInType ) { pDlgType = pInType; } + void SetPosDashLb( USHORT* pInPos ) { pPosDashLb = pInPos; } + void SetPosLineEndLb( USHORT* pInPos ) { pPosLineEndLb = pInPos; } + + void SetLineEndChgd( ChangeType* pIn ) { pnLineEndListState = pIn; } + void SetDashChgd( ChangeType* pIn ) { pnDashListState = pIn; } + void SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; } + + virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001 + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +}; + +/************************************************************************* +|* +|* Linien-Definitions-Tab-Page +|* +\************************************************************************/ + +class SvxLineDefTabPage : public SfxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; +private: + FixedLine aFlDefinition; + FixedText aFTLinestyle; + LineLB aLbLineStyles; + FixedText aFtType; + ListBox aLbType1; + ListBox aLbType2; + FixedText aFtNumber; + NumericField aNumFldNumber1; + NumericField aNumFldNumber2; + FixedText aFtLength; + MetricField aMtrLength1; + MetricField aMtrLength2; + FixedText aFtDistance; + MetricField aMtrDistance; + CheckBox aCbxSynchronize; + PushButton aBtnAdd; + PushButton aBtnModify; + PushButton aBtnDelete; + ImageButton aBtnLoad; + ImageButton aBtnSave; + SvxXLinePreview aCtlPreview; + + const SfxItemSet& rOutAttrs; + XDash aDash; + BOOL bObjSelected; + + XOutdevItemPool* pXPool; + XLineStyleItem aXLStyle; + XLineWidthItem aXWidth; + XLineDashItem aXDash; + XLineColorItem aXColor; + XLineAttrSetItem aXLineAttr; + SfxItemSet& rXLSet; + + XDashList* pDashList; + + ChangeType* pnDashListState; + USHORT* pPageType; + USHORT* pDlgType; + USHORT* pPosDashLb; + + SfxMapUnit ePoolUnit; + FieldUnit eFUnit; + +#ifdef _SVX_TPLNEDEF_CXX + void FillDash_Impl(); + void FillDialog_Impl(); + + DECL_LINK( ClickAddHdl_Impl, void * ); + DECL_LINK( ClickModifyHdl_Impl, void * ); + DECL_LINK( ClickDeleteHdl_Impl, void * ); + DECL_LINK( SelectLinestyleHdl_Impl, void * ); + DECL_LINK( ChangePreviewHdl_Impl, void * ); + DECL_LINK( ChangeNumber1Hdl_Impl, void * ); + DECL_LINK( ChangeNumber2Hdl_Impl, void * ); + DECL_LINK( ClickLoadHdl_Impl, void * ); + DECL_LINK( ClickSaveHdl_Impl, void * ); + DECL_LINK( ChangeMetricHdl_Impl, void * ); + DECL_LINK( SelectTypeHdl_Impl, void * ); + + void CheckChanges_Impl(); +#endif + +public: + SvxLineDefTabPage( Window* pParent, const SfxItemSet& rInAttrs ); + + void Construct(); + + static SfxTabPage* Create( Window*, const SfxItemSet& ); + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet & ); + + virtual void ActivatePage( const SfxItemSet& rSet ); + virtual int DeactivatePage( SfxItemSet* pSet ); + + void SetDashList( XDashList* pDshLst ) { pDashList = pDshLst; } + void SetObjSelected( BOOL bHasObj ) { bObjSelected = bHasObj; } + + void SetPageType( USHORT* pInType ) { pPageType = pInType; } + void SetDlgType( USHORT* pInType ) { pDlgType = pInType; } + void SetPosDashLb( USHORT* pInPos ) { pPosDashLb = pInPos; } + + void SetDashChgd( ChangeType* pIn ) { pnDashListState = pIn; } + + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +}; + +/************************************************************************* +|* +|* Linienenden-Definitions-Tab-Page +|* +\************************************************************************/ + +class SvxLineEndDefTabPage : public SfxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + +private: + FixedLine aFlTip; + FixedText aFTTitle; + Edit aEdtName; + FixedText aFTLineEndStyle; + LineEndLB aLbLineEnds; + PushButton aBtnAdd; + PushButton aBtnModify; + PushButton aBtnDelete; + ImageButton aBtnLoad; + ImageButton aBtnSave; + FixedInfo aFiTip; + SvxXLinePreview aCtlPreview; + + const SfxItemSet& rOutAttrs; + const SdrObject* pPolyObj; + BOOL bObjSelected; + + XOutdevItemPool* pXPool; + XLineStyleItem aXLStyle; + XLineWidthItem aXWidth; + XLineColorItem aXColor; + XLineAttrSetItem aXLineAttr; + SfxItemSet& rXLSet; + + XLineEndList* pLineEndList; + + ChangeType* pnLineEndListState; + USHORT* pPageType; + USHORT* pDlgType; + USHORT* pPosLineEndLb; + +#ifdef _SVX_TPLNEEND_CXX + DECL_LINK( ClickAddHdl_Impl, void * ); + DECL_LINK( ClickModifyHdl_Impl, void * ); + DECL_LINK( ClickDeleteHdl_Impl, void * ); + DECL_LINK( ClickLoadHdl_Impl, void * ); + DECL_LINK( ClickSaveHdl_Impl, void * ); + DECL_LINK( SelectLineEndHdl_Impl, void * ); + long ChangePreviewHdl_Impl( void* p ); + + void CheckChanges_Impl(); +#endif + +public: + SvxLineEndDefTabPage( Window* pParent, const SfxItemSet& rInAttrs ); + ~SvxLineEndDefTabPage(); + + void Construct(); + + static SfxTabPage* Create( Window*, const SfxItemSet& ); + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet & ); + + virtual void ActivatePage( const SfxItemSet& rSet ); + virtual int DeactivatePage( SfxItemSet* pSet ); + + void SetLineEndList( XLineEndList* pInList ) { pLineEndList = pInList; } + void SetPolyObj( const SdrObject* pObj ) { pPolyObj = pObj; } + void SetObjSelected( BOOL bHasObj ) { bObjSelected = bHasObj; } + + void SetPageType( USHORT* pInType ) { pPageType = pInType; } + void SetDlgType( USHORT* pInType ) { pDlgType = pInType; } + void SetPosLineEndLb( USHORT* pInPos ) { pPosLineEndLb = pInPos; } + + void SetLineEndChgd( ChangeType* pIn ) { pnLineEndListState = pIn; } + + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +}; + + +#endif // _CUI_TAB_LINE_HXX + diff --git a/cui/source/inc/cuitbxform.hxx b/cui/source/inc/cuitbxform.hxx new file mode 100644 index 000000000000..1587dd7baaf5 --- /dev/null +++ b/cui/source/inc/cuitbxform.hxx @@ -0,0 +1,29 @@ +#ifndef _CUI_TBXFORM_HXX +#define _CUI_TBXFORM_HXX + +#include <sfx2/tbxctrl.hxx> +#include <vcl/field.hxx> +#include <vcl/dialog.hxx> + +#ifndef _SV_BUTTON_HXX //autogen +#include <vcl/button.hxx> +#endif + +//======================================================================== + +class FmInputRecordNoDialog : public ModalDialog +{ +public: + FixedText m_aLabel; + NumericField m_aRecordNo; + OKButton m_aOk; + CancelButton m_aCancel; + +public: + FmInputRecordNoDialog(Window * pParent); + + void SetValue(long dNew) { m_aRecordNo.SetValue(dNew); } + long GetValue() const { return static_cast<long>(m_aRecordNo.GetValue()); } +}; + +#endif diff --git a/cui/source/inc/dbregister.hxx b/cui/source/inc/dbregister.hxx new file mode 100644 index 000000000000..b89ec4e779a0 --- /dev/null +++ b/cui/source/inc/dbregister.hxx @@ -0,0 +1,152 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_DBREGISTER_HXX +#define SVX_DBREGISTER_HXX + +#include "optpath.hxx" +#include <tools/string.hxx> +#include <comphelper/stl_types.hxx> +#include <svl/poolitem.hxx> +#include "ControlFocusHelper.hxx" +#include <sfx2/basedlgs.hxx> + +class SvLBoxEntry; +namespace svx +{ + class OptHeaderTabListBox; +} +//........................................................................ +namespace svx +{ +//........................................................................ + + //==================================================================== + //= DbRegistrationOptionsPage + //==================================================================== + class DbRegistrationOptionsPage : public SfxTabPage + { + private: + FixedLine aStdBox; + FixedText aTypeText; + FixedText aPathText; + SvxControlFocusHelper aPathCtrl; + PushButton m_aNew; + PushButton m_aEdit; + PushButton m_aDelete; + + HeaderBar* pHeaderBar; + ::svx::OptHeaderTabListBox* pPathBox; + SvLBoxEntry* m_pCurEntry; + ULONG m_nOldCount; + BOOL m_bModified; + +#ifdef SVX_DBREGISTER_HXX + DECL_LINK( NewHdl, void * ); + DECL_LINK( EditHdl, void * ); + DECL_LINK( DeleteHdl, void * ); + + DECL_LINK( PathSelect_Impl, SvTabListBox* ); + + DECL_LINK( HeaderSelect_Impl, HeaderBar * ); + DECL_LINK( HeaderEndDrag_Impl, HeaderBar * ); + DECL_LINK( NameValidator, String*); + + + /** inserts a new entry in the tablistbox + @param _sName + The name of the entry. + @param _sLocation + The location of the file. + */ + void insertNewEntry( const ::rtl::OUString& _sName,const ::rtl::OUString& _sLocation, const bool bReadOnly ); + + /** opens the LinkDialog to create a register pair + @param _sOldName + The old name of the entry may be empty. + @param _sOldLocation + The old location of the entry may be empty. + @param _pEntry + The entry to remove if the entry will be changed + */ + void openLinkDialog(const String& _sOldName,const String& _sOldLocation,SvLBoxEntry* _pEntry = NULL); + +#endif + + public: + DbRegistrationOptionsPage( Window* pParent, const SfxItemSet& rSet ); + virtual ~DbRegistrationOptionsPage(); + + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + virtual void FillUserData(); + }; + + //==================================================================== + //= RegistrationItemSetHolder + //==================================================================== + /** helper for DatabaseRegistrationDialog + + Necessary so that DatabaseRegistrationDialog is self-contained, i.e. always reflects + the current registration state. + */ + class RegistrationItemSetHolder + { + private: + SfxItemSet m_aRegistrationItems; + + protected: + RegistrationItemSetHolder( const SfxItemSet& _rMasterSet ); + ~RegistrationItemSetHolder(); + + protected: + const SfxItemSet& getRegistrationItems() const { return m_aRegistrationItems; } + }; + + //==================================================================== + //= DatabaseRegistrationDialog + //==================================================================== + class DatabaseRegistrationDialog :public RegistrationItemSetHolder + ,public SfxSingleTabDialog + { + public: + DatabaseRegistrationDialog( Window* pParent, const SfxItemSet& rAttr ); + ~DatabaseRegistrationDialog(); + + virtual short Execute(); + }; + +//........................................................................ +} // namespace svx +//........................................................................ + +#endif // SVX_DBREGISTER_HXX + + diff --git a/cui/source/inc/defdlgname.hxx b/cui/source/inc/defdlgname.hxx new file mode 100644 index 000000000000..3342d66968a2 --- /dev/null +++ b/cui/source/inc/defdlgname.hxx @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_DEF_DLG_NAME_HXX +#define _SVX_DEF_DLG_NAME_HXX + +// define ---------------------------------------------------------------- + +#define MESS_BTN_1 ((USHORT)0) +#define MESS_BTN_2 ((USHORT)1) + +// const ----------------------------------------------------------------- + +const short RET_BTN_1 = 100; +const short RET_BTN_2 = 101; + +#endif diff --git a/cui/source/inc/dialmgr.hxx b/cui/source/inc/dialmgr.hxx new file mode 100644 index 000000000000..fb91a14a44ff --- /dev/null +++ b/cui/source/inc/dialmgr.hxx @@ -0,0 +1,48 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _CUI_DIALMGR_HXX +#define _CUI_DIALMGR_HXX + +// include --------------------------------------------------------------- + +#include <tools/resid.hxx> + +// forward --------------------------------------------------------------- + +class ResMgr; +struct CuiResMgr +{ + static ResMgr* GetResMgr(); +}; + +#define CUI_MGR() (*CuiResMgr::GetResMgr()) +#define CUI_RES(i) ResId(i,CUI_MGR()) +#define CUI_RESSTR(i) UniString(ResId(i,CUI_MGR())) +#define CUI_RESSSTR(i) String(ResId(i,CUI_MGR())) + +#endif + diff --git a/cui/source/inc/dlgname.hxx b/cui/source/inc/dlgname.hxx new file mode 100644 index 000000000000..173ef8e45139 --- /dev/null +++ b/cui/source/inc/dlgname.hxx @@ -0,0 +1,204 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_DLG_NAME_HXX +#define _SVX_DLG_NAME_HXX + + +#ifndef _EDIT_HXX //autogen +#include <vcl/edit.hxx> +#endif +#ifndef _BUTTON_HXX //autogen +#include <vcl/button.hxx> +#endif +#ifndef _FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif +#ifndef _DIALOG_HXX //autogen +#include <vcl/dialog.hxx> +#endif +#include <vcl/fixed.hxx> + +// #i68101# +#include <svtools/svmedit.hxx> + +/************************************************************************* +|* +|* Dialog zum Editieren eines Namens +|* +\************************************************************************/ +class SvxNameDialog : public ModalDialog +{ +private: + FixedText aFtDescription; + Edit aEdtName; + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; + + Link aCheckNameHdl; +#if _SOLAR__PRIVATE + DECL_LINK(ModifyHdl, Edit*); +#endif + +public: + SvxNameDialog( Window* pWindow, const String& rName, const String& rDesc ); + + void GetName( String& rName ){rName = aEdtName.GetText();} + + /** add a callback Link that is called whenever the content of the edit + field is changed. The Link result determines wether the OK + Button is enabled (> 0) or disabled (== 0). + + @param rLink a Callback declared with DECL_LINK and implemented with + IMPL_LINK, that is executed on modification. + + @param bCheckImmediately If true, the Link is called directly after + setting it. It is recommended to set this flag to true to avoid + an inconsistent state if the initial String (given in the CTOR) + does not satisfy the check condition. + + @todo Remove the parameter bCheckImmediately and incorporate the 'true' + behaviour as default. + */ + void SetCheckNameHdl( const Link& rLink, bool bCheckImmediately = false ) + { + aCheckNameHdl = rLink; + if ( bCheckImmediately ) + aBtnOK.Enable( rLink.Call( this ) > 0 ); + } + + void SetEditHelpId( const rtl::OString& aHelpId) {aEdtName.SetHelpId(aHelpId);} +}; + +/////////////////////////////////////////////////////////////////////////////////////////////// +// #i68101# +// Dialog for editing Object Title and Description +// plus uniqueness-callback-linkHandler + +class SvxObjectNameDialog : public ModalDialog +{ +private: + // name + FixedText aFtName; + Edit aEdtName; + + // separator + FixedLine aFlSeparator; + + // buttons + HelpButton aBtnHelp; + OKButton aBtnOK; + CancelButton aBtnCancel; + + // callback link for name uniqueness + Link aCheckNameHdl; +#if _SOLAR__PRIVATE + DECL_LINK(ModifyHdl, Edit*); +#endif + +public: + // constructor + SvxObjectNameDialog(Window* pWindow, const String& rName); + + // data access + void GetName(String& rName) {rName = aEdtName.GetText(); } + + // set handler + void SetCheckNameHdl(const Link& rLink, bool bCheckImmediately = false) + { + aCheckNameHdl = rLink; + + if(bCheckImmediately) + { + aBtnOK.Enable(rLink.Call(this) > 0); + } + } +}; + +/////////////////////////////////////////////////////////////////////////////////////////////// +// #i68101# +// Dialog for editing Object Title and Description + +class SvxObjectTitleDescDialog : public ModalDialog +{ +private: + // title + FixedText aFtTitle; + Edit aEdtTitle; + + // description + FixedText aFtDescription; + MultiLineEdit aEdtDescription; + + // separator + FixedLine aFlSeparator; + + // buttons + HelpButton aBtnHelp; + OKButton aBtnOK; + CancelButton aBtnCancel; + +public: + // constructor + SvxObjectTitleDescDialog(Window* pWindow, const String& rTitle, const String& rDesc); + + // data access + void GetTitle(String& rTitle) {rTitle = aEdtTitle.GetText(); } + void GetDescription(String& rDescription) {rDescription = aEdtDescription.GetText(); } +}; + +/////////////////////////////////////////////////////////////////////////////////////////////// + +/************************************************************************* +|* +|* Dialog zum Abbrechen, Speichern oder Hinzufuegen +|* +\************************************************************************/ +class SvxMessDialog : public ModalDialog +{ +private: + FixedText aFtDescription; + PushButton aBtn1; + PushButton aBtn2; + CancelButton aBtnCancel; + FixedImage aFtImage; + Image* pImage; +#if _SOLAR__PRIVATE + DECL_LINK( Button1Hdl, Button * ); + DECL_LINK( Button2Hdl, Button * ); +#endif +public: + SvxMessDialog( Window* pWindow, const String& rText, const String& rDesc, Image* pImg = NULL ); + ~SvxMessDialog(); + + void SetButtonText( USHORT nBtnId, const String& rNewTxt ); +}; + + + +#endif // _SVX_DLG_NAME_HXX + diff --git a/cui/source/inc/dstribut.hxx b/cui/source/inc/dstribut.hxx new file mode 100644 index 000000000000..ef28d21c915e --- /dev/null +++ b/cui/source/inc/dstribut.hxx @@ -0,0 +1,125 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_DSTRIBUT_HXX +#define _SVX_DSTRIBUT_HXX + +#include <svx/dlgctrl.hxx> +#include <vcl/group.hxx> +#include <vcl/fixed.hxx> +#include <svx/dstribut_enum.hxx> //CHINA001 +/************************************************************************* +|* +\************************************************************************/ + +/* +enum SvxDistributeHorizontal +{ + SvxDistributeHorizontalNone = 0, + SvxDistributeHorizontalLeft, + SvxDistributeHorizontalCenter, + SvxDistributeHorizontalDistance, + SvxDistributeHorizontalRight +}; + +enum SvxDistributeVertical +{ + SvxDistributeVerticalNone = 0, + SvxDistributeVerticalTop, + SvxDistributeVerticalCenter, + SvxDistributeVerticalDistance, + SvxDistributeVerticalBottom +}; +*/ + +/************************************************************************* +|* +\************************************************************************/ + +class SvxDistributePage : public SvxTabPage +{ + SvxDistributeHorizontal meDistributeHor; + SvxDistributeVertical meDistributeVer; + + FixedLine maFlHorizontal ; + RadioButton maBtnHorNone ; + RadioButton maBtnHorLeft ; + RadioButton maBtnHorCenter ; + RadioButton maBtnHorDistance ; + RadioButton maBtnHorRight ; + FixedImage maHorLow ; + FixedImage maHorCenter ; + FixedImage maHorDistance ; + FixedImage maHorHigh ; + FixedLine maFlVertical ; + RadioButton maBtnVerNone ; + RadioButton maBtnVerTop ; + RadioButton maBtnVerCenter ; + RadioButton maBtnVerDistance ; + RadioButton maBtnVerBottom ; + FixedImage maVerLow ; + FixedImage maVerCenter ; + FixedImage maVerDistance ; + FixedImage maVerHigh ; + +public: + SvxDistributePage(Window* pWindow, const SfxItemSet& rInAttrs, + SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone, + SvxDistributeVertical eVer = SvxDistributeVerticalNone); + ~SvxDistributePage(); + + static SfxTabPage* Create(Window*, const SfxItemSet&, + SvxDistributeHorizontal eHor, SvxDistributeVertical eVer); + static UINT16* GetRanges(); + virtual BOOL FillItemSet(SfxItemSet&); + virtual void Reset(const SfxItemSet&); + virtual void PointChanged(Window* pWindow, RECT_POINT eRP); + + SvxDistributeHorizontal GetDistributeHor() const { return meDistributeHor; } + SvxDistributeVertical GetDistributeVer() const { return meDistributeVer; } +}; + +/************************************************************************* +|* +\************************************************************************/ + +class SvxDistributeDialog : public SfxSingleTabDialog +{ + SvxDistributePage* mpPage; + +public: + SvxDistributeDialog(Window* pParent, const SfxItemSet& rAttr, + SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone, + SvxDistributeVertical eVer = SvxDistributeVerticalNone); + ~SvxDistributeDialog(); + + SvxDistributeHorizontal GetDistributeHor() const { return mpPage->GetDistributeHor(); } + SvxDistributeVertical GetDistributeVer() const { return mpPage->GetDistributeVer(); } +}; + + +#endif // _SVX_DSTRIBUT_HXX + diff --git a/cui/source/inc/gallery.hrc b/cui/source/inc/gallery.hrc new file mode 100644 index 000000000000..c9d6729be447 --- /dev/null +++ b/cui/source/inc/gallery.hrc @@ -0,0 +1,101 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#include <cuires.hrc> + +// Gallery-TabDialoge/-TabPages +#define RID_SVXTABDLG_GALLERY (RID_CUI_GALLERY_START ) +#define RID_SVXTABDLG_GALLERYTHEME (RID_CUI_GALLERY_START + 2) +#define RID_SVXDLG_GALLERY_TITLE (RID_CUI_GALLERY_START + 82) + +#define RID_SVXTABPAGE_GALLERY_GENERAL (RID_CUI_GALLERY_START + 1) +#define RID_SVXTABPAGE_GALLERYTHEME_FILES (RID_CUI_GALLERY_START + 4) + +// Dialoge +#define RID_SVXDLG_GALLERY_SEARCH_PROGRESS (RID_CUI_GALLERY_START + 6) +#define RID_SVXDLG_GALLERY_TAKE_PROGRESS (RID_CUI_GALLERY_START + 7) +#define RID_SVXDLG_GALLERY_ACTUALIZE_PROGRESS (RID_CUI_GALLERY_START + 8) +#define RID_SVXDLG_GALLERY_THEMEID (RID_CUI_GALLERY_START + 9) + +// Gallery-Strings +#define RID_SVXSTR_GALLERY_NOFILES (RID_CUI_GALLERY_START + 12) +#define RID_SVXSTR_GALLERY_SEARCH (RID_CUI_GALLERY_START + 30) +#define RID_SVXSTR_GALLERYPROPS_OBJECT (RID_CUI_GALLERY_START + 39) +#define RID_SVXSTR_GALLERYPROPS_GALTHEME (RID_CUI_GALLERY_START + 40) +#define RID_SVXSTR_GALLERY_READONLY (RID_CUI_GALLERY_START + 43) +#define RID_SVXSTR_GALLERY_ALLFILES (RID_CUI_GALLERY_START + 44) +#define RID_SVXSTR_GALLERY_ID_EXISTS (RID_CUI_GALLERY_START + 81) + +// Images +#define RID_SVXBMP_THEME_NORMAL_BIG (RID_CUI_GALLERY_START + 49) +#define RID_SVXBMP_THEME_IMPORTED_BIG (RID_CUI_GALLERY_START + 51) +#define RID_SVXBMP_THEME_READONLY_BIG (RID_CUI_GALLERY_START + 53) +#define RID_SVXBMP_THEME_DEFAULT_BIG (RID_CUI_GALLERY_START + 55) + +// lokale Defines +#define BTN_OK 1 +#define BTN_CANCEL 1 +#define BTN_HELP 1 + +#define LBX_FOUND 1 +#define BTN_TAKE 5 +#define BTN_SEARCH 4 +#define CBX_PREVIEW 3 +#define FT_FILETYPE 2 +#define CBB_FILETYPE 1 +#define FL_SEARCH_DIR 1 +#define FL_SEARCH_TYPE 2 +#define FT_SEARCH_DIR 1 +#define FT_SEARCH_TYPE 2 +#define FL_TAKE_PROGRESS 1 +#define FT_TAKE_FILE 1 +#define BTN_TAKEALL 1 +#define WND_BRSPRV 1 +#define BTN_MADDIN1 8 +#define BTN_MADDIN2 9 + +#define FL_ACTUALIZE_PROGRESS 1 +#define FT_ACTUALIZE_FILE 1 +#define FL_ID 1 +#define LB_RESNAME 1 +#define EDT_TITLE 20 +#define FL_TITLE 21 + +// Gallery-TabDialog +#define FI_MS_IMAGE 1 +#define EDT_MS_NAME 1 +#define FL_MS_GENERAL_FIRST 1 +#define FT_MS_TYPE 2 +#define FT_MS_SHOW_TYPE 3 +#define FT_MS_PATH 4 +#define FT_MS_SHOW_PATH 5 +#define FT_MS_CONTENT 6 +#define FT_MS_SHOW_CONTENT 7 +#define FL_MS_GENERAL_SECOND 2 +#define FT_MS_CHANGEDATE 10 +#define FT_MS_SHOW_CHANGEDATE 11 + + diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx new file mode 100644 index 000000000000..91d6e89e61dd --- /dev/null +++ b/cui/source/inc/grfpage.hxx @@ -0,0 +1,140 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_GRFPAGE_HXX +#define _SVX_GRFPAGE_HXX + +#ifndef _FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif +#ifndef _BUTTON_HXX //autogen +#include <vcl/button.hxx> +#endif +#ifndef _FIELD_HXX //autogen +#include <vcl/field.hxx> +#endif +#include <vcl/graph.hxx> +#include <sfx2/tabdlg.hxx> + + +class SvxGrfCropPage : public SfxTabPage +{ + using Window::CalcZoom; + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + + class SvxCropExample : public Window + { + Size aFrameSize; + Point aTopLeft, aBottomRight; + Graphic aGrf; + + public: + SvxCropExample( Window* pPar, const ResId& rResId ); + + virtual void Paint( const Rectangle& rRect ); + + void SetTopLeft( const Point& rNew ) { aTopLeft = rNew; } + void SetTop( long nVal ) { aTopLeft.X() = nVal; } + void SetBottom( long nVal ) { aBottomRight.X() = nVal; } + void SetLeft( long nVal ) { aTopLeft.Y() = nVal; } + void SetRight( long nVal) { aBottomRight.Y() = nVal; } + void SetBottomRight(const Point& rNew ) { aBottomRight = rNew; } + void SetFrameSize( const Size& rSz ); + void SetGraphic( const Graphic& rGrf ) { aGrf = rGrf; } + const Graphic& GetGraphic() const { return aGrf; } + }; + + FixedLine aCropFL; + RadioButton aZoomConstRB; + RadioButton aSizeConstRB; + FixedText aLeftFT; + MetricField aLeftMF; + FixedText aRightFT; + MetricField aRightMF; + FixedText aTopFT; + MetricField aTopMF; + FixedText aBottomFT; + MetricField aBottomMF; + + FixedLine aZoomFL; + FixedText aWidthZoomFT; + MetricField aWidthZoomMF; + FixedText aHeightZoomFT; + MetricField aHeightZoomMF; + + FixedLine aSizeFL; + FixedText aWidthFT; + MetricField aWidthMF; + FixedText aHeightFT; + MetricField aHeightMF; + FixedText aOrigSizeFT; + PushButton aOrigSizePB; + + // Example + SvxCropExample aExampleWN; + + + Timer aTimer; + String aGraphicName; + Size aOrigSize; + Size aPageSize; + const MetricField* pLastCropField; + long nOldWidth; + long nOldHeight; + BOOL bReset; + BOOL bInitialized; + BOOL bSetOrigSize; + + + SvxGrfCropPage( Window *pParent, const SfxItemSet &rSet ); + virtual ~SvxGrfCropPage(); + + DECL_LINK( ZoomHdl, MetricField * ); + DECL_LINK( SizeHdl, MetricField * ); + DECL_LINK( CropHdl, const MetricField * ); + DECL_LINK( CropLoseFocusHdl, MetricField * ); + DECL_LINK( CropModifyHdl, MetricField * ); + DECL_LINK( OrigSizeHdl, PushButton * ); + DECL_LINK( Timeout, Timer * ); + + void CalcZoom(); + void CalcMinMaxBorder(); + void GraphicHasChanged(BOOL bFound); + virtual void ActivatePage(const SfxItemSet& rSet); + + Size GetGrfOrigSize( const Graphic& ) const; +public: + static SfxTabPage *Create( Window *pParent, const SfxItemSet &rSet ); + + virtual BOOL FillItemSet( SfxItemSet &rSet ); + virtual void Reset( const SfxItemSet &rSet ); + virtual int DeactivatePage( SfxItemSet *pSet ); +}; + + +#endif diff --git a/cui/source/inc/hangulhanjadlg.hxx b/cui/source/inc/hangulhanjadlg.hxx new file mode 100644 index 000000000000..6c344cec81c5 --- /dev/null +++ b/cui/source/inc/hangulhanjadlg.hxx @@ -0,0 +1,347 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef SVX_HANGUL_HANJA_DLG_HXX +#define SVX_HANGUL_HANJA_DLG_HXX + +#include <vcl/dialog.hxx> +#include <vcl/button.hxx> +#include <vcl/lstbox.hxx> +#include <vcl/combobox.hxx> +#include <vcl/fixed.hxx> +#include <vcl/scrbar.hxx> +#include <svx/checklbx.hxx> +#include <editeng/hangulhanja.hxx> +#include <com/sun/star/uno/Sequence.hxx> +#include <editeng/unolingu.hxx> +#include <com/sun/star/linguistic2/XConversionDictionaryList.hpp> +#include <svtools/valueset.hxx> + +#include <vector> +#include <memory> // for auto_ptr + +class SvxCommonLinguisticControl; +//............................................................................. +namespace svx +{ +//............................................................................. + + //========================================================================= + //= HangulHanjaConversionDialog + //========================================================================= + + class SuggestionSet : public ValueSet + { + public: + SuggestionSet( Window* pParent ); + virtual ~SuggestionSet(); + + virtual void UserDraw( const UserDrawEvent& rUDEvt ); + void ClearSet(); + }; + + class SuggestionDisplay : public Control + { + public: + SuggestionDisplay( Window* pParent, const ResId& rResId ); + virtual ~SuggestionDisplay(); + + void DisplayListBox( bool bDisplayListBox ); + + void SetSelectHdl( const Link& rLink ); + + void Clear(); + void InsertEntry( const XubString& rStr ); + void SelectEntryPos( USHORT nPos ); + + USHORT GetEntryCount() const; + + XubString GetEntry( USHORT nPos ) const; + XubString GetSelectEntry() const; + + virtual void StateChanged( StateChangedType nStateChange ); + + virtual void KeyInput( const KeyEvent& rKEvt ); + virtual void KeyUp( const KeyEvent& rKEvt ); + virtual void Activate(); + virtual void Deactivate(); + virtual void GetFocus(); + virtual void LoseFocus(); + virtual void Command( const CommandEvent& rCEvt ); + + DECL_LINK( SelectSuggestionHdl, Control* ); + + void SetHelpIds(); + + private: + void implUpdateDisplay(); + Control& implGetCurrentControl(); + + private: + bool m_bDisplayListBox;//otherwise ValueSet + SuggestionSet m_aValueSet; + ListBox m_aListBox; + + Link m_aSelectLink; + bool m_bInSelectionUpdate; + }; + + class HangulHanjaConversionDialog : public ModalDialog + { + private: + ::std::auto_ptr< SvxCommonLinguisticControl > + m_pPlayground; // order matters: before all other controls! + + PushButton m_aFind; + SuggestionDisplay m_aSuggestions; + FixedText m_aFormat; + RadioButton m_aSimpleConversion; + RadioButton m_aHangulBracketed; + RadioButton m_aHanjaBracketed; + ::std::auto_ptr< RadioButton > m_pHanjaAbove; + ::std::auto_ptr< RadioButton > m_pHanjaBelow; + ::std::auto_ptr< RadioButton > m_pHangulAbove; + ::std::auto_ptr< RadioButton > m_pHangulBelow; + FixedText m_aConversion; + CheckBox m_aHangulOnly; + CheckBox m_aHanjaOnly; + CheckBox m_aReplaceByChar; + + CheckBox* m_pIgnoreNonPrimary; + bool m_bDocumentMode; + // are we working for a document? This is normally true, but in case + // the user uses the "find" functionality, we switch to working + // with what the user entered, which then does not have any relation to + // the document anymore. Some functionality must be disabled then + + Link m_aOptionsChangedLink; + Link m_aClickByCharacterLink; + + public: + HangulHanjaConversionDialog( + Window* _pParent, + editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection ); + ~HangulHanjaConversionDialog( ); + + public: + void SetOptionsChangedHdl( const Link& _rHdl ); + void SetIgnoreHdl( const Link& _rHdl ); + void SetIgnoreAllHdl( const Link& _rHdl ); + void SetChangeHdl( const Link& _rHdl ); + void SetChangeAllHdl( const Link& _rHdl ); + + void SetClickByCharacterHdl( const Link& _rHdl ); + void SetConversionFormatChangedHdl( const Link& _rHdl ); + void SetFindHdl( const Link& _rHdl ); + + String GetCurrentString( ) const; + void SetCurrentString( + const String& _rNewString, + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rSuggestions, + bool _bOriginatesFromDocument = true + ); + + void FocusSuggestion( ); + + // retrieves the current suggestion + String GetCurrentSuggestion( ) const; + + void SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType ); + editeng::HangulHanjaConversion::ConversionFormat GetConversionFormat( ) const; + + void SetByCharacter( sal_Bool _bByCharacter ); + 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) + editeng::HangulHanjaConversion::ConversionDirection GetDirection( editeng::HangulHanjaConversion::ConversionDirection eDefaultDirection ) const; + + // enables or disbales the checkboxes for ruby formatted replacements + void EnableRubySupport( sal_Bool bVal ); + + private: + DECL_LINK( OnClose, void* ); + DECL_LINK( OnOption, void* ); + DECL_LINK( OnSuggestionModified, void* ); + DECL_LINK( OnSuggestionSelected, void* ); + DECL_LINK( OnConversionDirectionClicked, CheckBox* ); + DECL_LINK( ClickByCharacterHdl, CheckBox* ); + + // fill the suggestion list box with suggestions for the actual input + void FillSuggestions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rSuggestions ); + }; + + + typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XConversionDictionary > > HHDictList; + + class HangulHanjaOptionsDialog : public ModalDialog + { + private: + FixedText m_aUserdefdictFT; + SvxCheckListBox m_aDictsLB; + FixedLine m_aOptionsFL; + CheckBox m_aIgnorepostCB; + CheckBox m_aShowrecentlyfirstCB; + CheckBox m_aAutoreplaceuniqueCB; + PushButton m_aNewPB; + PushButton m_aEditPB; + PushButton m_aDeletePB; + OKButton m_aOkPB; + CancelButton m_aCancelPB; + HelpButton m_aHelpPB; + + SvLBoxButtonData* m_pCheckButtonData; + + HHDictList m_aDictList; + ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XConversionDictionaryList > m_xConversionDictionaryList; + + DECL_LINK( OkHdl, void* ); + DECL_LINK( OnNew, void* ); + DECL_LINK( OnEdit, void* ); + DECL_LINK( OnDelete, void* ); + DECL_LINK( DictsLB_SelectHdl, void* ); + DECL_LINK( NewDictHdl, void* ); + DECL_LINK( EditDictHdl, void* ); + DECL_LINK( DeleteDictHdl, void* ); + + void Init( void ); // reads settings from core and init controls + public: + HangulHanjaOptionsDialog( Window* _pParent ); + virtual ~HangulHanjaOptionsDialog(); + + void AddDict( const String& _rName, bool _bChecked ); + }; + + + class HangulHanjaNewDictDialog : public ModalDialog + { + private: + FixedLine m_aNewDictFL; + FixedText m_aDictNameFT; + Edit m_aDictNameED; + OKButton m_aOkBtn; + CancelButton m_aCancelBtn; + HelpButton m_aHelpBtn; + + bool m_bEntered; + + DECL_LINK( OKHdl, void* ); + DECL_LINK( ModifyHdl, void* ); + protected: + public: + HangulHanjaNewDictDialog( Window* _pParent ); + virtual ~HangulHanjaNewDictDialog(); + + bool GetName( String& _rRetName ) const; + }; + + + class SuggestionList; + + class SuggestionEdit : public Edit + { + private: + SuggestionEdit* m_pPrev; + SuggestionEdit* m_pNext; + ScrollBar& m_rScrollBar; + + bool ShouldScroll( bool _bUp ) const; + void DoJump( bool _bUp ); + public: + SuggestionEdit( Window* pParent, const ResId& rResId, + ScrollBar& _rScrollBar, + SuggestionEdit* _pPrev, SuggestionEdit* _pNext ); + virtual ~SuggestionEdit(); + virtual long PreNotify( NotifyEvent& rNEvt ); + }; + + + class HangulHanjaEditDictDialog : public ModalDialog + { + private: + const String m_aEditHintText; + HHDictList& m_rDictList; + sal_uInt32 m_nCurrentDict; + + String m_aOriginal; + SuggestionList* m_pSuggestions; + + FixedText m_aBookFT; + ListBox m_aBookLB; + FixedText m_aOriginalFT; + ComboBox m_aOriginalLB; + FixedText m_aSuggestionsFT; + SuggestionEdit m_aEdit1; + SuggestionEdit m_aEdit2; + SuggestionEdit m_aEdit3; + SuggestionEdit m_aEdit4; + ScrollBar m_aScrollSB; + PushButton m_aNewPB; + PushButton m_aDeletePB; + HelpButton m_aHelpPB; + CancelButton m_aClosePB; + + sal_uInt16 m_nTopPos; + bool m_bModifiedSuggestions; + bool m_bModifiedOriginal; + + DECL_LINK( OriginalModifyHdl, void* ); + DECL_LINK( ScrollHdl, void* ); + DECL_LINK( EditModifyHdl1, Edit* ); + DECL_LINK( EditModifyHdl2, Edit* ); + DECL_LINK( EditModifyHdl3, Edit* ); + DECL_LINK( EditModifyHdl4, Edit* ); + + DECL_LINK( BookLBSelectHdl, void* ); + DECL_LINK( NewPBPushHdl, void* ); + DECL_LINK( DeletePBPushHdl, void* ); + + void InitEditDictDialog( sal_uInt32 _nSelDict ); + void UpdateOriginalLB( void ); + void UpdateSuggestions( void ); + void UpdateButtonStates(); + + void SetEditText( Edit& _rEdit, sal_uInt16 _nEntryNum ); + void EditModify( Edit* _pEdit, sal_uInt8 _nEntryOffset ); + void EditFocusLost( Edit* _pEdit, sal_uInt8 _nEntryOffset ); + + bool DeleteEntryFromDictionary( const ::rtl::OUString& rEntry, const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XConversionDictionary >& xDict ); + + public: + HangulHanjaEditDictDialog( Window* _pParent, HHDictList& _rDictList, sal_uInt32 _nSelDict ); + ~HangulHanjaEditDictDialog(); + + void UpdateScrollbar( void ); + }; + +//............................................................................. +} // namespace svx +//............................................................................. + +#endif // SVX_HANGUL_HANJA_HXX diff --git a/cui/source/inc/headertablistbox.hxx b/cui/source/inc/headertablistbox.hxx new file mode 100644 index 000000000000..ecf59a426528 --- /dev/null +++ b/cui/source/inc/headertablistbox.hxx @@ -0,0 +1,68 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _HEADERTABLISTBOX_HXX +#define _HEADERTABLISTBOX_HXX + +#include <svtools/headbar.hxx> +#include <svtools/svtabbx.hxx> + + +class _HeaderTabListBox : public Control +{ +private: + SvHeaderTabListBox maListBox; + HeaderBar maHeaderBar; +protected: + DECL_LINK( HeaderEndDrag_Impl, HeaderBar* ); + virtual long Notify( NotifyEvent& rNEvt ); +public: + _HeaderTabListBox( Window* pParent, const ResId& rId ); + virtual ~_HeaderTabListBox(); + + inline SvHeaderTabListBox& GetListBox( void ); + inline HeaderBar& GetHeaderBar( void ); + + void ConnectElements( void ); + // should be called after all manipulations on elements are done + // calcs real sizes depending on sizes of this + void Show( BOOL bVisible = TRUE, USHORT nFlags = 0 ); // same meaning as Windows::Show() + void Enable( bool bEnable = true, bool bChild = true ); // same meaning as Windows::Enable() +}; + +inline SvHeaderTabListBox& _HeaderTabListBox::GetListBox( void ) +{ + return maListBox; +} + +inline HeaderBar& _HeaderTabListBox::GetHeaderBar( void ) +{ + return maHeaderBar; +} + + +#endif diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc new file mode 100644 index 000000000000..dff73253b086 --- /dev/null +++ b/cui/source/inc/helpid.hrc @@ -0,0 +1,390 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _CUI_HELPID_HRC +#define _CUI_HELPID_HRC +// include --------------------------------------------------------------- + +#include <svx/svxcommands.h> +#include <sfx2/sfxcommands.h> + +// Help-Ids -------------------------------------------------------------- + +#define HID_OPTIONS_COLOR "CUI_HID_OPTIONS_COLOR" +#define HID_OPTIONS_SAVE "CUI_HID_OPTIONS_SAVE" +#define HID_OPTIONS_PATH "CUI_HID_OPTIONS_PATH" +#define HID_OPTIONS_GENERAL "CUI_HID_OPTIONS_GENERAL" +#define HID_OPTIONS_LINGU "CUI_HID_OPTIONS_LINGU" +#define HID_OPTIONS_SPELL "CUI_HID_OPTIONS_SPELL" +#define HID_OPTIONS_DICT_NEW "CUI_HID_OPTIONS_DICT_NEW" +#define HID_OPTIONS_DICT_EDIT "CUI_HID_OPTIONS_DICT_EDIT" +#define HID_OPTIONS_INET "CUI_HID_OPTIONS_INET" +#define HID_OPTIONS_CHART_DEFCOLORS "CUI_HID_OPTIONS_CHART_DEFCOLORS" +#define HID_OPTIONS_CTL "CUI_HID_OPTIONS_CTL" +#define HID_OPTIONS_PROXY "CUI_HID_OPTIONS_PROXY" +#define HID_OPTIONS_SEARCH "CUI_HID_OPTIONS_SEARCH" +#define HID_OPTIONS_MAIL "CUI_HID_OPTIONS_MAIL" +#define HID_OPTIONS_ASIAN_LAYOUT "CUI_HID_OPTIONS_ASIAN_LAYOUT" +#define HID_CLB_EDIT_MODULES_DICS "CUI_HID_CLB_EDIT_MODULES_DICS" +#define HID_CLB_EDIT_MODULES_MODULES "CUI_HID_CLB_EDIT_MODULES_MODULES" +#define HID_CLB_LINGU_MODULES "CUI_HID_CLB_LINGU_MODULES" +#define HID_CLB_LINGU_OPTIONS "CUI_HID_CLB_LINGU_OPTIONS" +#define HID_EDIT_MODULES "CUI_HID_EDIT_MODULES" +#define HID_LNGDLG_NUM_PREBREAK "CUI_HID_LNGDLG_NUM_PREBREAK" +#define HID_OPTIONS_COLORCONFIG "CUI_HID_OPTIONS_COLORCONFIG" +#define HID_OPTIONS_COLORCONFIG_SAVE_SCHEME "CUI_HID_OPTIONS_COLORCONFIG_SAVE_SCHEME" +#define HID_OPTIONS_ACCESSIBILITYCONFIG "CUI_HID_OPTIONS_ACCESSIBILITYCONFIG" +#define HID_OPTIONS_COLORCONFIG_COLORLIST_WIN "CUI_HID_OPTIONS_COLORCONFIG_COLORLIST_WIN" +#define HID_OPTIONS_COLORCONFIG_NAME_SCHEME "CUI_HID_OPTIONS_COLORCONFIG_NAME_SCHEME" +#define HID_OPTIONS_PATHS_SELECTFOLDER "CUI_HID_OPTIONS_PATHS_SELECTFOLDER" +#define HID_OPTIONS_JAVA "CUI_HID_OPTIONS_JAVA" +#define HID_OPTIONS_JAVA_LIST "CUI_HID_OPTIONS_JAVA_LIST" +#define HID_OPTIONS_JAVA_PARAMETER "CUI_HID_OPTIONS_JAVA_PARAMETER" +#define HID_OPTIONS_JAVA_CLASSPATH "CUI_HID_OPTIONS_JAVA_CLASSPATH" +#define HID_SVXPAGE_JSEARCH_OPTIONS "CUI_HID_SVXPAGE_JSEARCH_OPTIONS" +#define HID_SVXDLG_FILTER_WARNING "CUI_HID_SVXDLG_FILTER_WARNING" +#define HID_SVX_OPTIONS_ONLINEUPDATE "CUI_HID_SVX_OPTIONS_ONLINEUPDATE" +#define HID_DLG_SECURITY_OPTIONS "CUI_HID_DLG_SECURITY_OPTIONS" +#define HID_OFADLG_OPTIONS_TREE "CUI_HID_OFADLG_OPTIONS_TREE" +#define HID_OFA_CONNPOOL_DRIVERLIST "CUI_HID_OFA_CONNPOOL_DRIVERLIST" +#define UID_OFA_CONNPOOL_DRIVERLIST_BACK "CUI_UID_OFA_CONNPOOL_DRIVERLIST_BACK" +#define HID_OFA_FONT_SUBST_CLB "CUI_HID_OFA_FONT_SUBST_CLB" +#define HID_OFA_TP_MISC "CUI_HID_OFA_TP_MISC" +#define HID_OFA_TP_VIEW "CUI_HID_OFA_TP_VIEW" +#define HID_OFA_TP_LANGUAGES "CUI_HID_OFA_TP_LANGUAGES" +#define HID_OFA_TP_MEMORY "CUI_HID_OFA_TP_MEMORY" +#define HID_DBPATH_CTL_PATH "CUI_HID_DBPATH_CTL_PATH" +#define HID_DBPATH_HEADERBAR "CUI_HID_DBPATH_HEADERBAR" +#define HID_OFAPAGE_SMARTTAG_OPTIONS "CUI_HID_OFAPAGE_SMARTTAG_OPTIONS" +#define HID_OFAPAGE_MSFLTR2_CLB "CUI_HID_OFAPAGE_MSFLTR2_CLB" +#define HID_OPTPATH_CTL_PATH "CUI_HID_OPTPATH_CTL_PATH" +#define HID_OFADLG_TREELISTBOX "CUI_HID_OFADLG_TREELISTBOX" +#define HID_DLG_WEBCONNECTION_INFO "CUI_HID_DLG_WEBCONNECTION_INFO" +#define HID_OPTIONS_DICT_EDIT_ENTRIES_LIST "CUI_HID_OPTIONS_DICT_EDIT_ENTRIES_LIST" +#define HID_OPTPATH_HEADERBAR "CUI_HID_OPTPATH_HEADERBAR" +#define HID_WARN_NAME_DUPLICATE "CUI_HID_WARN_NAME_DUPLICATE" +#define HID_COLORPAGE_LISTBOX_START "CUI_HID_COLORPAGE_LISTBOX_START" +#define HID_COLORPAGE_DOCCOLOR_LB "CUI_HID_COLORPAGE_DOCCOLOR_LB" +#define HID_COLORPAGE_DOCBOUNDARIES_LB "CUI_HID_COLORPAGE_DOCBOUNDARIES_LB" +#define HID_COLORPAGE_APPBACKGROUND_LB "CUI_HID_COLORPAGE_APPBACKGROUND_LB" +#define HID_COLORPAGE_OBJECTBOUNDARIES_LB "CUI_HID_COLORPAGE_OBJECTBOUNDARIES_LB" +#define HID_COLORPAGE_TABLEBOUNDARIES_LB "CUI_HID_COLORPAGE_TABLEBOUNDARIES_LB" +#define HID_COLORPAGE_FONTCOLOR_LB "CUI_HID_COLORPAGE_FONTCOLOR_LB" +#define HID_COLORPAGE_LINKS_LB "CUI_HID_COLORPAGE_LINKS_LB" +#define HID_COLORPAGE_LINKSVISITED_LB "CUI_HID_COLORPAGE_LINKSVISITED_LB" +#define HID_COLORPAGE_ANCHOR_LB "CUI_HID_COLORPAGE_ANCHOR_LB" +#define HID_COLORPAGE_SPELL_LB "CUI_HID_COLORPAGE_SPELL_LB" +#define HID_COLORPAGE_WRITERTEXTGRID_LB "CUI_HID_COLORPAGE_WRITERTEXTGRID_LB" +#define HID_COLORPAGE_WRITERFIELDSHADINGS_LB "CUI_HID_COLORPAGE_WRITERFIELDSHADINGS_LB" +#define HID_COLORPAGE_WRITERIDXSHADINGS_LB "CUI_HID_COLORPAGE_WRITERIDXSHADINGS_LB" +#define HID_COLORPAGE_WRITERDIRECTCURSOR_LB "CUI_HID_COLORPAGE_WRITERDIRECTCURSOR_LB" +#define HID_COLORPAGE_WRITERNOTESINDICATOR_LB "CUI_HID_COLORPAGE_WRITERNOTESINDICATOR_LB" +#define HID_COLORPAGE_WRITERSCRIPTINDICATOR_LB "CUI_HID_COLORPAGE_WRITERSCRIPTINDICATOR_LB" +#define HID_COLORPAGE_WRITERSECTIONBOUNDARIES_LB "CUI_HID_COLORPAGE_WRITERSECTIONBOUNDARIES_LB" +#define HID_COLORPAGE_WRITERPAGEBREAKS_LB "CUI_HID_COLORPAGE_WRITERPAGEBREAKS_LB" +#define HID_COLORPAGE_HTMLSGML_LB "CUI_HID_COLORPAGE_HTMLSGML_LB" +#define HID_COLORPAGE_HTMLCOMMENT_LB "CUI_HID_COLORPAGE_HTMLCOMMENT_LB" +#define HID_COLORPAGE_HTMLKEYWORD_LB "CUI_HID_COLORPAGE_HTMLKEYWORD_LB" +#define HID_COLORPAGE_HTMLUNKNOWN_LB "CUI_HID_COLORPAGE_HTMLUNKNOWN_LB" +#define HID_COLORPAGE_CALCGRID_LB "CUI_HID_COLORPAGE_CALCGRID_LB" +#define HID_COLORPAGE_CALCPAGEBREAK_LB "CUI_HID_COLORPAGE_CALCPAGEBREAK_LB" +#define HID_COLORPAGE_CALCPAGEBREAKMANUAL_LB "CUI_HID_COLORPAGE_CALCPAGEBREAKMANUAL_LB" +#define HID_COLORPAGE_CALCPAGEBREAKAUTOMATIC_LB "CUI_HID_COLORPAGE_CALCPAGEBREAKAUTOMATIC_LB" +#define HID_COLORPAGE_CALCDETECTIVE_LB "CUI_HID_COLORPAGE_CALCDETECTIVE_LB" +#define HID_COLORPAGE_CALCDETECTIVEERROR_LB "CUI_HID_COLORPAGE_CALCDETECTIVEERROR_LB" +#define HID_COLORPAGE_CALCREFERENCE_LB "CUI_HID_COLORPAGE_CALCREFERENCE_LB" +#define HID_COLORPAGE_CALCNOTESBACKGROUND_LB "CUI_HID_COLORPAGE_CALCNOTESBACKGROUND_LB" +#define HID_COLORPAGE_DRAWGRID_LB "CUI_HID_COLORPAGE_DRAWGRID_LB" +#define HID_COLORPAGE_DRAWDRAWING_LB "CUI_HID_COLORPAGE_DRAWDRAWING_LB" +#define HID_COLORPAGE_DRAWFILL_LB "CUI_HID_COLORPAGE_DRAWFILL_LB" +#define HID_COLORPAGE_BASICIDENTIFIER_LB "CUI_HID_COLORPAGE_BASICIDENTIFIER_LB" +#define HID_COLORPAGE_BASICCOMMENT_LB "CUI_HID_COLORPAGE_BASICCOMMENT_LB" +#define HID_COLORPAGE_BASICNUMBER_LB "CUI_HID_COLORPAGE_BASICNUMBER_LB" +#define HID_COLORPAGE_BASICSTRING_LB "CUI_HID_COLORPAGE_BASICSTRING_LB" +#define HID_COLORPAGE_BASICOPERATOR_LB "CUI_HID_COLORPAGE_BASICOPERATOR_LB" +#define HID_COLORPAGE_BASICKEYWORD_LB "CUI_HID_COLORPAGE_BASICKEYWORD_LB" +#define HID_COLORPAGE_BASICERROR_LB "CUI_HID_COLORPAGE_BASICERROR_LB" +#define HID_COLORPAGE_CHECKBOX_START "CUI_HID_COLORPAGE_CHECKBOX_START" +#define HID_COLORPAGE_DOCCOLOR_CB "CUI_HID_COLORPAGE_DOCCOLOR_CB" +#define HID_COLORPAGE_DOCBOUNDARIES_CB "CUI_HID_COLORPAGE_DOCBOUNDARIES_CB" +#define HID_COLORPAGE_APPBACKGROUND_CB "CUI_HID_COLORPAGE_APPBACKGROUND_CB" +#define HID_COLORPAGE_OBJECTBOUNDARIES_CB "CUI_HID_COLORPAGE_OBJECTBOUNDARIES_CB" +#define HID_COLORPAGE_TABLEBOUNDARIES_CB "CUI_HID_COLORPAGE_TABLEBOUNDARIES_CB" +#define HID_COLORPAGE_FONTCOLOR_CB "CUI_HID_COLORPAGE_FONTCOLOR_CB" +#define HID_COLORPAGE_LINKS_CB "CUI_HID_COLORPAGE_LINKS_CB" +#define HID_COLORPAGE_LINKSVISITED_CB "CUI_HID_COLORPAGE_LINKSVISITED_CB" +#define HID_COLORPAGE_ANCHOR_CB "CUI_HID_COLORPAGE_ANCHOR_CB" +#define HID_COLORPAGE_SPELL_CB "CUI_HID_COLORPAGE_SPELL_CB" +#define HID_COLORPAGE_WRITERTEXTGRID_CB "CUI_HID_COLORPAGE_WRITERTEXTGRID_CB" +#define HID_COLORPAGE_WRITERFIELDSHADINGS_CB "CUI_HID_COLORPAGE_WRITERFIELDSHADINGS_CB" +#define HID_COLORPAGE_WRITERIDXSHADINGS_CB "CUI_HID_COLORPAGE_WRITERIDXSHADINGS_CB" +#define HID_COLORPAGE_WRITERDIRECTCURSOR_CB "CUI_HID_COLORPAGE_WRITERDIRECTCURSOR_CB" +#define HID_COLORPAGE_WRITERNOTESINDICATOR_CB "CUI_HID_COLORPAGE_WRITERNOTESINDICATOR_CB" +#define HID_COLORPAGE_WRITERSCRIPTINDICATOR_CB "CUI_HID_COLORPAGE_WRITERSCRIPTINDICATOR_CB" +#define HID_COLORPAGE_WRITERSECTIONBOUNDARIES_CB "CUI_HID_COLORPAGE_WRITERSECTIONBOUNDARIES_CB" +#define HID_COLORPAGE_WRITERPAGEBREAKS_CB "CUI_HID_COLORPAGE_WRITERPAGEBREAKS_CB" +#define HID_COLORPAGE_HTMLSGML_CB "CUI_HID_COLORPAGE_HTMLSGML_CB" +#define HID_COLORPAGE_HTMLCOMMENT_CB "CUI_HID_COLORPAGE_HTMLCOMMENT_CB" +#define HID_COLORPAGE_HTMLKEYWORD_CB "CUI_HID_COLORPAGE_HTMLKEYWORD_CB" +#define HID_COLORPAGE_HTMLUNKNOWN_CB "CUI_HID_COLORPAGE_HTMLUNKNOWN_CB" +#define HID_COLORPAGE_CALCGRID_CB "CUI_HID_COLORPAGE_CALCGRID_CB" +#define HID_COLORPAGE_CALCPAGEBREAK_CB "CUI_HID_COLORPAGE_CALCPAGEBREAK_CB" +#define HID_COLORPAGE_CALCPAGEBREAKMANUAL_CB "CUI_HID_COLORPAGE_CALCPAGEBREAKMANUAL_CB" +#define HID_COLORPAGE_CALCPAGEBREAKAUTOMATIC_CB "CUI_HID_COLORPAGE_CALCPAGEBREAKAUTOMATIC_CB" +#define HID_COLORPAGE_CALCDETECTIVE_CB "CUI_HID_COLORPAGE_CALCDETECTIVE_CB" +#define HID_COLORPAGE_CALCDETECTIVEERROR_CB "CUI_HID_COLORPAGE_CALCDETECTIVEERROR_CB" +#define HID_COLORPAGE_CALCREFERENCE_CB "CUI_HID_COLORPAGE_CALCREFERENCE_CB" +#define HID_COLORPAGE_CALCNOTESBACKGROUND_CB "CUI_HID_COLORPAGE_CALCNOTESBACKGROUND_CB" +#define HID_COLORPAGE_DRAWGRID_CB "CUI_HID_COLORPAGE_DRAWGRID_CB" +#define HID_COLORPAGE_DRAWDRAWING_CB "CUI_HID_COLORPAGE_DRAWDRAWING_CB" +#define HID_COLORPAGE_DRAWFILL_CB "CUI_HID_COLORPAGE_DRAWFILL_CB" +#define HID_COLORPAGE_BASICIDENTIFIER_CB "CUI_HID_COLORPAGE_BASICIDENTIFIER_CB" +#define HID_COLORPAGE_BASICCOMMENT_CB "CUI_HID_COLORPAGE_BASICCOMMENT_CB" +#define HID_COLORPAGE_BASICNUMBER_CB "CUI_HID_COLORPAGE_BASICNUMBER_CB" +#define HID_COLORPAGE_BASICSTRING_CB "CUI_HID_COLORPAGE_BASICSTRING_CB" +#define HID_COLORPAGE_BASICOPERATOR_CB "CUI_HID_COLORPAGE_BASICOPERATOR_CB" +#define HID_COLORPAGE_BASICKEYWORD_CB "CUI_HID_COLORPAGE_BASICKEYWORD_CB" +#define HID_COLORPAGE_BASICERROR_CB "CUI_HID_COLORPAGE_BASICERROR_CB" +#define HID_NUMBERINGOPT_SEL_GRF_FROM_FILE "CUI_HID_NUMBERINGOPT_SEL_GRF_FROM_FILE" +#define HID_SVX_MACRO_LB_EVENT "CUI_HID_SVX_MACRO_LB_EVENT" +#define HID_SVX_CONFIG_EVENT "CUI_HID_SVX_CONFIG_EVENT" +#define HID_CONFIG_EVENT_OFFICE_BASED "CUI_HID_CONFIG_EVENT_OFFICE_BASED" +#define HID_CONFIG_EVENT_DOCUMENT_BASED "CUI_HID_CONFIG_EVENT_DOCUMENT_BASED" +#define HID_SELECTOR_DIALOG "CUI_HID_SELECTOR_DIALOG" +#define HID_SELECTOR_CATEGORIES "CUI_HID_SELECTOR_CATEGORIES" +#define HID_SVX_CONFIG_TOOLBAR "CUI_HID_SVX_CONFIG_TOOLBAR" +#define HID_SVX_CONFIG_TOOLBAR_CONTENTS "CUI_HID_SVX_CONFIG_TOOLBAR_CONTENTS" +#define HID_SELECTOR_COMMANDS "CUI_HID_SELECTOR_COMMANDS" +#define HID_GALLERY_EDIT_MSNAME "CUI_HID_GALLERY_EDIT_MSNAME" +#define HID_SVX_CONFIG_MENU "CUI_HID_SVX_CONFIG_MENU" +#define HID_SVX_CONFIG_MENU_CONTENTS "CUI_HID_SVX_CONFIG_MENU_CONTENTS" +#define HID_GALLERY_NEWTHEME_FINDFILES "CUI_HID_GALLERY_NEWTHEME_FINDFILES" +#define HID_GALLERY_NEWTHEME_ADDFILES "CUI_HID_GALLERY_NEWTHEME_ADDFILES" +#define HID_HANGULDLG_BUTTON_OPTIONS "CUI_HID_HANGULDLG_BUTTON_OPTIONS" +#define HID_HANGULDLG_BUTTON_CLOSE "CUI_HID_HANGULDLG_BUTTON_CLOSE" +#define HID_HANGULDLG_BUTTON_IGNORE "CUI_HID_HANGULDLG_BUTTON_IGNORE" +#define HID_HANGULDLG_BUTTON_IGNOREALL "CUI_HID_HANGULDLG_BUTTON_IGNOREALL" +#define HID_HANGULDLG_BUTTON_CHANGE "CUI_HID_HANGULDLG_BUTTON_CHANGE" +#define HID_HANGULDLG_BUTTON_CHANGEALL "CUI_HID_HANGULDLG_BUTTON_CHANGEALL" +#define HID_OFA_FONT_SUBSTITUTION "CUI_HID_OFA_FONT_SUBSTITUTION" +#define HID_HANGULDLG_EDIT_NEWWORD "CUI_HID_HANGULDLG_EDIT_NEWWORD" +#define HID_OFA_SUBST_APPLY "CUI_HID_OFA_SUBST_APPLY" +#define HID_OFA_SUBST_DELETE "CUI_HID_OFA_SUBST_DELETE" +#define HID_SPLDLG_BUTTON_CLOSE "CUI_HID_SPLDLG_BUTTON_CLOSE" +#define HID_SPLDLG_BUTTON_IGNORE "CUI_HID_SPLDLG_BUTTON_IGNORE" +#define HID_SPLDLG_BUTTON_IGNOREALL "CUI_HID_SPLDLG_BUTTON_IGNOREALL" +#define HID_SPLDLG_BUTTON_CHANGE "CUI_HID_SPLDLG_BUTTON_CHANGE" +#define HID_SPLDLG_BUTTON_CHANGEALL "CUI_HID_SPLDLG_BUTTON_CHANGEALL" +#define HID_SPLDLG_BUTTON_EXPLAIN "CUI_HID_SPLDLG_BUTTON_EXPLAIN" +#define HID_CHARMAP_CTL_SHOWSET "CUI_HID_CHARMAP_CTL_SHOWSET" +#define HID_CHARMAP_CTL_SHOWTEXT "CUI_HID_CHARMAP_CTL_SHOWTEXT" +#define HID_CHARMAP_CTL_SHOWCHAR "CUI_HID_CHARMAP_CTL_SHOWCHAR" +#define HID_DLG_NAME "CUI_HID_DLG_NAME" +#define HID_DLG_MESSBOX "CUI_HID_DLG_MESSBOX" +#define HID_HANGULDLG_SUGGESTIONS "CUI_HID_HANGULDLG_SUGGESTIONS" +#define HID_HANGULDLG_SUGGESTIONS_GRID "CUI_HID_HANGULDLG_SUGGESTIONS_GRID" +#define HID_HANGULDLG_SUGGESTIONS_LIST "CUI_HID_HANGULDLG_SUGGESTIONS_LIST" +#define HID_DLG_OBJECT_NAME "CUI_HID_DLG_OBJECT_NAME" +#define HID_DLG_OBJECT_TITLE_DESC "CUI_HID_DLG_OBJECT_TITLE_DESC" +#define HID_SVX_CONFIG_MENU_ORGANIZER "CUI_HID_SVX_CONFIG_MENU_ORGANIZER" +#define HID_SVX_CONFIG_ICON_SELECTOR "CUI_HID_SVX_CONFIG_ICON_SELECTOR" +#define HID_SVX_CONFIG_NAME_SUBMENU "CUI_HID_SVX_CONFIG_NAME_SUBMENU" +#define HID_SVX_CONFIG_RENAME_MENU "CUI_HID_SVX_CONFIG_RENAME_MENU" +#define HID_SVX_CONFIG_RENAME_MENU_ITEM "CUI_HID_SVX_CONFIG_RENAME_MENU_ITEM" +#define HID_SVX_CONFIG_RENAME_TOOLBAR "CUI_HID_SVX_CONFIG_RENAME_TOOLBAR" +#define HID_SVX_CONFIG_RENAME_TOOLBAR_ITEM "CUI_HID_SVX_CONFIG_RENAME_TOOLBAR_ITEM" +#define HID_SVX_NEW_TOOLBAR "CUI_HID_SVX_NEW_TOOLBAR" +#define HID_SVX_MODIFY_TOOLBAR "CUI_HID_SVX_MODIFY_TOOLBAR" +#define HID_SVX_NEW_TOOLBAR_ITEM "CUI_HID_SVX_NEW_TOOLBAR_ITEM" +#define HID_SVX_CONFIG_MENU_LISTBOX "CUI_HID_SVX_CONFIG_MENU_LISTBOX" +#define HID_SVX_MODIFY_TOOLBAR_ITEM "CUI_HID_SVX_MODIFY_TOOLBAR_ITEM" +#define HID_SVX_SAVE_IN "CUI_HID_SVX_SAVE_IN" +#define HID_OPTIONS_MULTIPATH_LIST "CUI_HID_OPTIONS_MULTIPATH_LIST" +#define HID_FM_DLG_SEARCH "CUI_HID_FM_DLG_SEARCH" +#define HID_SEARCH_TEXT "CUI_HID_SEARCH_TEXT" +#define HID_SEARCH_ALLFIELDS "CUI_HID_SEARCH_ALLFIELDS" +#define HID_GALLERY_PROPERTIES_GENERAL "CUI_HID_GALLERY_PROPERTIES_GENERAL" +#define HID_SEARCH_FIELDSELECTION "CUI_HID_SEARCH_FIELDSELECTION" +#define HID_SEARCH_POSITION "CUI_HID_SEARCH_POSITION" +#define HID_SEARCH_FORMATTER "CUI_HID_SEARCH_FORMATTER" +#define HID_SEARCH_CASE "CUI_HID_SEARCH_CASE" +#define HID_SEARCH_BACKWARD "CUI_HID_SEARCH_BACKWARD" +#define HID_SEARCH_STARTOVER "CUI_HID_SEARCH_STARTOVER" +#define HID_SEARCH_WILDCARD "CUI_HID_SEARCH_WILDCARD" +#define HID_SEARCH_REGULAR "CUI_HID_SEARCH_REGULAR" +#define HID_SEARCH_APPROX "CUI_HID_SEARCH_APPROX" +#define HID_SEARCH_APPROXSETTINGS "CUI_HID_SEARCH_APPROXSETTINGS" +#define HID_SEARCH_BTN_SEARCH "CUI_HID_SEARCH_BTN_SEARCH" +#define HID_SEARCH_BTN_CLOSE "CUI_HID_SEARCH_BTN_CLOSE" +#define HID_GALLERY_BROWSER "CUI_HID_GALLERY_BROWSER" +#define HID_GALLERY_SEARCH "CUI_HID_GALLERY_SEARCH" +#define HID_GALLERY_APPLY "CUI_HID_GALLERY_APPLY" +#define HID_SPLDLG_BUTTON_IGNORERULE "CUI_HID_SPLDLG_BUTTON_IGNORERULE" +#define HID_CONFIG_ACCEL "CUI_HID_CONFIG_ACCEL" +#define HID_ACCELCONFIG_LISTBOX "CUI_HID_ACCELCONFIG_LISTBOX" +#define HID_CONFIGGROUP_ACC_LISTBOX "CUI_HID_CONFIGGROUP_ACC_LISTBOX" +#define HID_CONFIGFUNCTION_ACC_LISTBOX "CUI_HID_CONFIGFUNCTION_ACC_LISTBOX" +#define HID_MACRO_LB_EVENT "CUI_HID_MACRO_LB_EVENT" +#define HID_MACRO_GROUP "CUI_HID_MACRO_GROUP" +#define HID_MACRO_MACROS "CUI_HID_MACRO_MACROS" +#define HID_DIALOG_HANGULHANJA "CUI_HID_DIALOG_HANGULHANJA" +#define HID_HANGULHANJA_OPT_DLG "CUI_HID_HANGULHANJA_OPT_DLG" +#define HID_HANGULHANJA_NEWDICT_DLG "CUI_HID_HANGULHANJA_NEWDICT_DLG" +#define HID_HANGULHANJA_EDIT_DLG "CUI_HID_HANGULHANJA_EDIT_DLG" +#define HID_HANGULHANJA_OPT_DICTS_LB "CUI_HID_HANGULHANJA_OPT_DICTS_LB" +#define HID_MULTIPATH "CUI_HID_MULTIPATH" +#define HID_SCRIPTORG_DIALOG "CUI_HID_SCRIPTORG_DIALOG" +#define HID_SCRIPTSBOX "CUI_HID_SCRIPTSBOX" +#define HID_SPELLCHECK "CUI_HID_SPELLCHECK" +#define HID_TPSIZE_CTRL "CUI_HID_TPSIZE_CTRL" +#define HID_TPROTATION_CTRL1 "CUI_HID_TPROTATION_CTRL1" +#define HID_TPROTATION_CTRL2 "CUI_HID_TPROTATION_CTRL2" +#define HID_TRANS_ANGLE "CUI_HID_TRANS_ANGLE" +#define HID_TPPOSITION_CTRL "CUI_HID_TPPOSITION_CTRL" +#define HID_NUMBERFORMAT_LB_FORMAT "CUI_HID_NUMBERFORMAT_LB_FORMAT" +#define HID_NUMBERFORMAT_WND_NUMBER_PREVIEW "CUI_HID_NUMBERFORMAT_WND_NUMBER_PREVIEW" +#define HID_TRANS_SLANT "CUI_HID_TRANS_SLANT" +#define HID_TPHATCH_CTRL "CUI_HID_TPHATCH_CTRL" +#define HID_SEARCHATTR_CTL_ATTR "CUI_HID_SEARCHATTR_CTL_ATTR" +#define HID_NUMBERFORMAT_TBI_INFO "CUI_HID_NUMBERFORMAT_TBI_INFO" +#define HID_SEARCHATTR "CUI_HID_SEARCHATTR" +#define HID_ALIGNMENT_CTR_DIAL "CUI_HID_ALIGNMENT_CTR_DIAL" +#define HID_ALIGNMENT_CTR_BORDER_LOCK "CUI_HID_ALIGNMENT_CTR_BORDER_LOCK" +#define HID_SEARCHSIMILARITY "CUI_HID_SEARCHSIMILARITY" +#define UID_SEARCH_RECORDSTATUS "CUI_UID_SEARCH_RECORDSTATUS" +#define HID_OFAPAGE_AUTOCORR_CLB "CUI_HID_OFAPAGE_AUTOCORR_CLB" +#define HID_AUTOCORR_LANGUAGE "CUI_HID_AUTOCORR_LANGUAGE" +#define HID_OFAPAGE_AUTOFORMAT_CLB "CUI_HID_OFAPAGE_AUTOFORMAT_CLB" +#define HID_TPCOLOR_RGB_1 "CUI_HID_TPCOLOR_RGB_1" +#define HID_TPCOLOR_RGB_2 "CUI_HID_TPCOLOR_RGB_2" +#define HID_TPCOLOR_RGB_3 "CUI_HID_TPCOLOR_RGB_3" +#define HID_TPCOLOR_CMYK_1 "CUI_HID_TPCOLOR_CMYK_1" +#define HID_TPCOLOR_CMYK_2 "CUI_HID_TPCOLOR_CMYK_2" +#define HID_TPCOLOR_CMYK_3 "CUI_HID_TPCOLOR_CMYK_3" +#define HID_ALIGNMENT "CUI_HID_ALIGNMENT" +#define HID_OFAPAGE_AUTOCORR_OPTIONS "CUI_HID_OFAPAGE_AUTOCORR_OPTIONS" +#define HID_OFAPAGE_AUTOFMT_OPTIONS "CUI_HID_OFAPAGE_AUTOFMT_OPTIONS" +#define HID_OFAPAGE_AUTOCORR_REPLACE "CUI_HID_OFAPAGE_AUTOCORR_REPLACE" +#define HID_OFACTL_AUTOCORR_REPLACE "CUI_HID_OFACTL_AUTOCORR_REPLACE" +#define HID_OFAPAGE_AUTOCORR_EXCEPT "CUI_HID_OFAPAGE_AUTOCORR_EXCEPT" +#define HID_OFAPAGE_AUTOCORR_QUOTE "CUI_HID_OFAPAGE_AUTOCORR_QUOTE" +#define HID_OFAPAGE_AUTOCOMPLETE_OPTIONS "CUI_HID_OFAPAGE_AUTOCOMPLETE_OPTIONS" +#define HID_BACKGROUND "CUI_HID_BACKGROUND" +#define HID_BACKGROUND_CTL_BGDCOLORSET "CUI_HID_BACKGROUND_CTL_BGDCOLORSET" +#define HID_BACKGROUND_CTL_POSITION "CUI_HID_BACKGROUND_CTL_POSITION" +#define HID_BORDER "CUI_HID_BORDER" +#define HID_BORDER_CTL_PRESETS "CUI_HID_BORDER_CTL_PRESETS" +#define HID_BORDER_CTL_SHADOWS "CUI_HID_BORDER_CTL_SHADOWS" +#define HID_PAGE_CONNECTION "CUI_HID_PAGE_CONNECTION" +#define HID_PAGE_CONNECTION_CTL_PREVIEW "CUI_HID_PAGE_CONNECTION_CTL_PREVIEW" +#define HID_PAGE_DISTRIBUTE "CUI_HID_PAGE_DISTRIBUTE" +#define HID_SVXPAGE_GRFCROP "CUI_HID_SVXPAGE_GRFCROP" +#define HID_CAPTION "CUI_HID_CAPTION" +#define HID_CAPTION_CTL_TYPE "CUI_HID_CAPTION_CTL_TYPE" +#define HID_PAGE_MEASURE "CUI_HID_PAGE_MEASURE" +#define HID_MEASURE_CTL_POSITION "CUI_HID_MEASURE_CTL_POSITION" +#define HID_NUMBERFORMAT "CUI_HID_NUMBERFORMAT" +#define HID_NUMBERFORMAT_TBI_ADD "CUI_HID_NUMBERFORMAT_TBI_ADD" +#define HID_NUMBERFORMAT_TBI_REMOVE "CUI_HID_NUMBERFORMAT_TBI_REMOVE" +#define HID_FORMAT_PAGE "CUI_HID_FORMAT_PAGE" +#define HID_REDLINING_DLG "CUI_HID_REDLINING_DLG" +#define HID_REDLINING_EDIT "CUI_HID_REDLINING_EDIT" +#define HID_REDLINING_PREV "CUI_HID_REDLINING_PREV" +#define HID_REDLINING_NEXT "CUI_HID_REDLINING_NEXT" +#define HID_FORMAT_PARAGRAPH_STD "CUI_HID_FORMAT_PARAGRAPH_STD" +#define HID_VALUESET_SINGLENUM "CUI_HID_VALUESET_SINGLENUM" +#define HID_VALUESET_BULLET "CUI_HID_VALUESET_BULLET" +#define HID_VALUESET_NUM "CUI_HID_VALUESET_NUM" +#define HID_VALUESET_NUMBMP "CUI_HID_VALUESET_NUMBMP" +#define HID_SVXPAGE_PICK_NUM "CUI_HID_SVXPAGE_PICK_NUM" +#define HID_SVXPAGE_PICK_SINGLE_NUM "CUI_HID_SVXPAGE_PICK_SINGLE_NUM" +#define HID_SVXPAGE_PICK_BMP "CUI_HID_SVXPAGE_PICK_BMP" +#define HID_SVXPAGE_PICK_BULLET "CUI_HID_SVXPAGE_PICK_BULLET" +#define HID_SVXPAGE_NUM_OPTIONS "CUI_HID_SVXPAGE_NUM_OPTIONS" +#define HID_SVXPAGE_NUM_POSITION "CUI_HID_SVXPAGE_NUM_POSITION" +#define HID_MEASURE_CTL_PREVIEW "CUI_HID_MEASURE_CTL_PREVIEW" +#define HID_FORMAT_PARAGRAPH_EXT "CUI_HID_FORMAT_PARAGRAPH_EXT" +#define HID_FORMAT_PARAGRAPH_ALIGN "CUI_HID_FORMAT_PARAGRAPH_ALIGN" +#define HID_SVXPAGE_PARA_ASIAN "CUI_HID_SVXPAGE_PARA_ASIAN" +#define HID_SVXPAGE_SWPOSSIZE "CUI_HID_SVXPAGE_SWPOSSIZE" +#define HID_AREA_TRANSPARENCE "CUI_HID_AREA_TRANSPARENCE" +#define HID_AREA_AREA "CUI_HID_AREA_AREA" +#define HID_AREA_SHADOW "CUI_HID_AREA_SHADOW" +#define HID_AREA_HATCH "CUI_HID_AREA_HATCH" +#define HID_AREA_BITMAP "CUI_HID_AREA_BITMAP" +#define HID_TPSHADOW_CTRL "CUI_HID_TPSHADOW_CTRL" +#define HID_AREA_GRADIENT "CUI_HID_AREA_GRADIENT" +#define HID_LINE_ENDDEF "CUI_HID_LINE_ENDDEF" +#define HID_LINE_LINE "CUI_HID_LINE_LINE" +#define HID_LINE_DEF "CUI_HID_LINE_DEF" +#define HID_SPELLDLG_SETWORD "CUI_HID_SPELLDLG_SETWORD" +#define HID_TABULATOR "CUI_HID_TABULATOR" +#define HID_PAGE_TEXTATTR "CUI_HID_PAGE_TEXTATTR" +#define HID_TEXTATTR_CTL_POSITION "CUI_HID_TEXTATTR_CTL_POSITION" +#define HID_TRANS_POSITION_SIZE "CUI_HID_TRANS_POSITION_SIZE" +#define HID_HYPHENATE "CUI_HID_HYPHENATE" +#define HID_SVXPAGE_CHAR_NAME "CUI_HID_SVXPAGE_CHAR_NAME" +#define HID_SVXPAGE_CHAR_EFFECTS "CUI_HID_SVXPAGE_CHAR_EFFECTS" +#define HID_SVXPAGE_CHAR_POSITION "CUI_HID_SVXPAGE_CHAR_POSITION" +#define HID_HYPERLINK_INTERNET "CUI_HID_HYPERLINK_INTERNET" +#define HID_HYPERLINK_MAIL "CUI_HID_HYPERLINK_MAIL" +#define HID_HYPERLINK_DOCUMENT "CUI_HID_HYPERLINK_DOCUMENT" +#define HID_HYPERLINK_NEWDOCUMENT "CUI_HID_HYPERLINK_NEWDOCUMENT" +#define HID_HYPERLINK_MARKWND "CUI_HID_HYPERLINK_MARKWND" +#define HID_ICCDIALOG_RESET_BTN "CUI_HID_ICCDIALOG_RESET_BTN" +#define HID_ICCDIALOG_CHOICECTRL "CUI_HID_ICCDIALOG_CHOICECTRL" +#define HID_HYPERDLG_INET_PATH "CUI_HID_HYPERDLG_INET_PATH" +#define HID_HYPERDLG_MAIL_PATH "CUI_HID_HYPERDLG_MAIL_PATH" +#define HID_HYPERDLG_DOC_PATH "CUI_HID_HYPERDLG_DOC_PATH" +#define HID_ICCDIALOG_OK_BTN "CUI_HID_ICCDIALOG_OK_BTN" +#define HID_ICCDIALOG_CANCEL_BTN "CUI_HID_ICCDIALOG_CANCEL_BTN" +#define HID_HYPERLINK_MARKWND_APPLY "CUI_HID_HYPERLINK_MARKWND_APPLY" +#define HID_HYPERLINK_MARKWND_CLOSE "CUI_HID_HYPERLINK_MARKWND_CLOSE" +#define HID_HYPERLINK_MARKWND_TREE "CUI_HID_HYPERLINK_MARKWND_TREE" +#define HID_SVXPAGE_CHAR_TWOLINES "CUI_HID_SVXPAGE_CHAR_TWOLINES" +#define HID_GRFFILTER_EMBOSS_LIGHT "CUI_HID_GRFFILTER_EMBOSS_LIGHT" +#define HID_PASTE_DLG "CUI_HID_PASTE_DLG" +#define HID_LINKDLG_TABLB "CUI_HID_LINKDLG_TABLB" +#define HID_MACRO_HEADERTABLISTBOX "CUI_HID_MACRO_HEADERTABLISTBOX" +#define HID_GALLERY_ENTER_TITLE "CUI_HID_GALLERY_ENTER_TITLE" +#define HID_GALLERY_TITLE_EDIT "CUI_HID_GALLERY_TITLE_EDIT" +#define HID_THES_LANGUAGE "CUI_HID_THES_LANGUAGE" +#define HID_OFAPAGE_QUOTE_SW_CLB "CUI_HID_OFAPAGE_QUOTE_SW_CLB" +#define HID_OFAPAGE_QUOTE_CLB "CUI_HID_OFAPAGE_QUOTE_CLB" +#define HID_POSTIT_DIALOG "CUI_HID_POSTIT_DIALOG" +#define HID_CT_THES_ALTERNATIVES "CUI_HID_CT_THES_ALTERNATIVES" + +#define HID_DLG_PASSWORD_TO_OPEN_MODIFY "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY" +#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_OPEN "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_OPEN" +#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_CONFIRM_PASSWORD_TO_OPEN "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_CONFIRM_PASSWORD_TO_OPEN" +#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_MORE "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_MORE" +#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_FILE_READONLY "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_FILE_READONLY" +#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_MODIFY "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_MODIFY" +#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_CONFIRM_PASSWORD_TO_MODIFY "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_CONFIRM_PASSWORD_TO_MODIFY" +#define HID_HYPERLINK_DIALOG "CUI_HID_HYPERLINK_DIALOG" + +#endif + diff --git a/cui/source/inc/hldocntp.hxx b/cui/source/inc/hldocntp.hxx new file mode 100644 index 000000000000..9859fc9c0f80 --- /dev/null +++ b/cui/source/inc/hldocntp.hxx @@ -0,0 +1,76 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_TABPAGE_DOCNEW_HYPERLINK_HXX +#define _SVX_TABPAGE_DOCNEW_HYPERLINK_HXX + +#include "hltpbase.hxx" + +/************************************************************************* +|* +|* Tabpage : Hyperlink - New Document +|* +\************************************************************************/ + +class SvxHyperlinkNewDocTp : public SvxHyperlinkTabPageBase +{ +private: + FixedLine maGrpNewDoc; + RadioButton maRbtEditNow; + RadioButton maRbtEditLater; + FixedText maFtPath; + SvxHyperURLBox maCbbPath; + ImageButton maBtCreate; + FixedText maFtDocTypes; + ListBox maLbDocTypes; + + sal_Bool ImplGetURLObject( const String& rPath, const String& rBase, INetURLObject& aURLObject ) const; + void FillDocumentList (); + + DECL_LINK (ClickNewHdl_Impl , void * ); // Button : New + + Image GetImage( USHORT nId ); + +protected: + void FillDlgFields ( String& aStrURL ); + void GetCurentItemData ( String& aStrURL, String& aStrName, + String& aStrIntName, String& aStrFrame, + SvxLinkInsertMode& eMode ); + +public: + SvxHyperlinkNewDocTp ( Window *pParent, const SfxItemSet& rItemSet); + ~SvxHyperlinkNewDocTp (); + + static IconChoicePage* Create( Window* pWindow, const SfxItemSet& rItemSet ); + + virtual BOOL AskApply (); + virtual void DoApply (); + + virtual void SetInitFocus(); +}; + + +#endif // _SVX_TABPAGE_DOCNEW_HYPERLINK_HXX diff --git a/cui/source/inc/hldoctp.hxx b/cui/source/inc/hldoctp.hxx new file mode 100644 index 000000000000..08bfd4d9d308 --- /dev/null +++ b/cui/source/inc/hldoctp.hxx @@ -0,0 +1,93 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_TABPAGE_DOC_HYPERLINK_HXX +#define _SVX_TABPAGE_DOC_HYPERLINK_HXX + +#include "hltpbase.hxx" + +/************************************************************************* +|* +|* Tabpage : Hyperlink - Document +|* +\************************************************************************/ + +class SvxHyperlinkDocTp : public SvxHyperlinkTabPageBase +{ +private: + FixedLine maGrpDocument; + FixedText maFtPath; + SvxHyperURLBox maCbbPath; + ImageButton maBtFileopen; + + FixedLine maGrpTarget; + FixedText maFtTarget; + Edit maEdTarget; + FixedText maFtURL; + FixedText maFtFullURL; + ImageButton maBtBrowse; + + String maStrURL; + + BOOL mbMarkWndOpen; + + DECL_LINK (ClickFileopenHdl_Impl , void * ); // Button : Fileopen + DECL_LINK (ClickTargetHdl_Impl , void * ); // Button : Target + + DECL_LINK (ModifiedPathHdl_Impl , void * ); // Contens of combobox "Path" modified + DECL_LINK (ModifiedTargetHdl_Impl, void * ); // Contens of editfield "Target" modified + + DECL_LINK (LostFocusPathHdl_Impl, void * ); // Combobox "path" lost its focus + + DECL_LINK (TimeoutHdl_Impl , Timer * ); // Handler for timer -timeout + + enum EPathType { Type_Unknown, Type_Invalid, + Type_ExistsFile, Type_File, + Type_ExistsDir, Type_Dir }; + EPathType GetPathType ( String& aStrPath ); + +protected: + void FillDlgFields ( String& aStrURL ); + void GetCurentItemData ( String& aStrURL, String& aStrName, + String& aStrIntName, String& aStrFrame, + SvxLinkInsertMode& eMode ); + virtual BOOL ShouldOpenMarkWnd () {return mbMarkWndOpen;} + virtual void SetMarkWndShouldOpen (BOOL bOpen) {mbMarkWndOpen=bOpen;} + String GetCurrentURL (); + +public: + SvxHyperlinkDocTp ( Window *pParent, const SfxItemSet& rItemSet); + ~SvxHyperlinkDocTp (); + + static IconChoicePage* Create( Window* pWindow, const SfxItemSet& rItemSet ); + + virtual void SetMarkStr ( String& aStrMark ); + + virtual void SetInitFocus(); +}; + + +#endif // _SVX_TABPAGE_DOC_HYPERLINK_HXX diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx new file mode 100644 index 000000000000..e39bb20900af --- /dev/null +++ b/cui/source/inc/hlinettp.hxx @@ -0,0 +1,107 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_TABPAGE_INET_HYPERLINK_HXX +#define _SVX_TABPAGE_INET_HYPERLINK_HXX + +#include <svx/hyperdlg.hxx> +#include "cuihyperdlg.hxx" +#include "hltpbase.hxx" + +/************************************************************************* +|* +|* Tabpage : Hyperlink - Internet +|* +\************************************************************************/ + +class SvxHyperlinkInternetTp : public SvxHyperlinkTabPageBase +{ +private: + FixedLine maGrpLinkTyp; + RadioButton maRbtLinktypInternet; + RadioButton maRbtLinktypFTP; + RadioButton maRbtLinktypTelnet; + FixedText maFtTarget; + SvxHyperURLBox maCbbTarget; + FixedText maFtLogin; + Edit maEdLogin; + FixedText maFtPassword; + Edit maEdPassword; + CheckBox maCbAnonymous; + ImageButton maBtBrowse; + ImageButton maBtTarget; + + String maStrOldUser; + String maStrOldPassword; + + BOOL mbMarkWndOpen; + + String maStrStdDocURL; + + DECL_LINK (Click_SmartProtocol_Impl , void * ); // Radiobutton clicked: Type Internet, FTP or Telnet + DECL_LINK (ClickAnonymousHdl_Impl , void * ); // Checkbox : Anonymer Benutzer + DECL_LINK (ClickBrowseHdl_Impl , void * ); // Button : Browse + DECL_LINK (ClickTargetHdl_Impl , void * ); // Button : Ziel + DECL_LINK (ModifiedLoginHdl_Impl , void * ); // Contens of editfield "Login" modified + DECL_LINK (LostFocusTargetHdl_Impl , void * ); // Combobox "Target" lost its focus + DECL_LINK (ModifiedTargetHdl_Impl , void * ); // Contens of editfield "Target" modified + + DECL_LINK (TimeoutHdl_Impl , Timer * ); // Handler for timer -timeout + + + void SetScheme( const String& aScheme ); + void RemoveImproperProtocol(const String& aProperScheme); + String GetSchemeFromButtons() const; + INetProtocol GetSmartProtocolFromButtons() const; + + String CreateAbsoluteURL() const; + + void setAnonymousFTPUser(); + void setFTPUser(const String& rUser, const String& rPassword); + void RefreshMarkWindow(); + +protected: + virtual void FillDlgFields ( String& aStrURL ); + virtual void GetCurentItemData ( String& aStrURL, String& aStrName, + String& aStrIntName, String& aStrFrame, + SvxLinkInsertMode& eMode ); + virtual BOOL ShouldOpenMarkWnd () {return ( mbMarkWndOpen && maRbtLinktypInternet.IsChecked() );} + virtual void SetMarkWndShouldOpen (BOOL bOpen) {mbMarkWndOpen=bOpen;} + +public: + SvxHyperlinkInternetTp ( Window *pParent, const SfxItemSet& rItemSet); + ~SvxHyperlinkInternetTp (); + + static IconChoicePage* Create( Window* pWindow, const SfxItemSet& rItemSet ); + + virtual void SetMarkStr ( String& aStrMark ); + virtual void SetOnlineMode( BOOL bEnable ); + + virtual void SetInitFocus(); +}; + + +#endif // _SVX_TABPAGE_INET_HYPERLINK_HXX diff --git a/cui/source/inc/hlmailtp.hxx b/cui/source/inc/hlmailtp.hxx new file mode 100644 index 000000000000..e2f9e787970d --- /dev/null +++ b/cui/source/inc/hlmailtp.hxx @@ -0,0 +1,77 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_TABPAGE_MAIL_HYPERLINK_HXX +#define _SVX_TABPAGE_MAIL_HYPERLINK_HXX + +#include "hltpbase.hxx" + +/************************************************************************* +|* +|* Tabpage : Hyperlink - Mail & News +|* +\************************************************************************/ + +class SvxHyperlinkMailTp : public SvxHyperlinkTabPageBase +{ +private: + FixedLine maGrpMailNews; + RadioButton maRbtMail; + RadioButton maRbtNews; + FixedText maFtReceiver; + SvxHyperURLBox maCbbReceiver; + ImageButton maBtAdrBook; + FixedText maFtSubject; + Edit maEdSubject; + + DECL_LINK (Click_SmartProtocol_Impl, void * ); // Radiobutton clicked: Type EMAIl or News + DECL_LINK (ClickAdrBookHdl_Impl , void * ); // Button : Address book + DECL_LINK (ModifiedReceiverHdl_Impl, void * ); // Combobox "receiver" modified + + void SetScheme( const String& aScheme ); + void RemoveImproperProtocol(const String& aProperScheme); + String GetSchemeFromButtons() const; + INetProtocol GetSmartProtocolFromButtons() const; + + String CreateAbsoluteURL() const; + +protected: + virtual void FillDlgFields ( String& aStrURL ); + virtual void GetCurentItemData ( String& aStrURL, String& aStrName, + String& aStrIntName, String& aStrFrame, + SvxLinkInsertMode& eMode ); + +public: + SvxHyperlinkMailTp ( Window *pParent, const SfxItemSet& rItemSet); + ~SvxHyperlinkMailTp (); + + static IconChoicePage* Create( Window* pWindow, const SfxItemSet& rItemSet ); + + virtual void SetInitFocus(); +}; + + +#endif // _SVX_TABPAGE_MAIL_HYPERLINK_HXX diff --git a/cui/source/inc/hlmarkwn.hxx b/cui/source/inc/hlmarkwn.hxx new file mode 100644 index 000000000000..615e2e56bdc3 --- /dev/null +++ b/cui/source/inc/hlmarkwn.hxx @@ -0,0 +1,111 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_BKWND_HYPERLINK_HXX +#define _SVX_BKWND_HYPERLINK_HXX + +#include <com/sun/star/container/XNameAccess.hpp> +#include <vcl/dialog.hxx> +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +#include <svtools/svtreebx.hxx> + +#include "hlmarkwn_def.hxx" //ADD CHINA001 +class SvxHyperlinkTabPageBase; + +//######################################################################## +//# # +//# Tree-Window # +//# # +//######################################################################## + +class SvxHlinkDlgMarkWnd; + +class SvxHlmarkTreeLBox : public SvTreeListBox +{ +private: + SvxHlinkDlgMarkWnd* mpParentWnd; + +public: + SvxHlmarkTreeLBox( Window* pParent, const ResId& rResId ); + + virtual void Paint( const Rectangle& rRect ); +}; + +//######################################################################## +//# # +//# Window-Class # +//# # +//######################################################################## + +class SvxHlinkDlgMarkWnd : public ModalDialog //FloatingWindow +{ +private: + friend class SvxHlmarkTreeLBox; + + PushButton maBtApply; + PushButton maBtClose; + //SvTreeListBox maLbTree; + SvxHlmarkTreeLBox maLbTree; + + BOOL mbUserMoved; + BOOL mbFirst; + + SvxHyperlinkTabPageBase* mpParent; + + String maStrLastURL; + + USHORT mnError; + +protected: + BOOL RefreshFromDoc( ::rtl::OUString aURL ); + + SvLBoxEntry* FindEntry ( String aStrName ); + void ClearTree(); + int FillTree( ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xLinks, SvLBoxEntry* pParentEntry =NULL ); + + virtual void Move (); + + DECL_LINK (ClickApplyHdl_Impl, void * ); + DECL_LINK (ClickCloseHdl_Impl, void * ); + +public: + SvxHlinkDlgMarkWnd (SvxHyperlinkTabPageBase *pParent); + ~SvxHlinkDlgMarkWnd(); + + BOOL MoveTo ( Point aNewPos ); + void RefreshTree ( String aStrURL ); + void SelectEntry ( String aStrMark ); + + BOOL ConnectToDialog( BOOL bDoit = TRUE ); + + USHORT SetError( USHORT nError); +}; + + +#endif // _SVX_BKWND_HYPERLINK_HXX diff --git a/cui/source/inc/hlmarkwn_def.hxx b/cui/source/inc/hlmarkwn_def.hxx new file mode 100644 index 000000000000..cc1c341486ea --- /dev/null +++ b/cui/source/inc/hlmarkwn_def.hxx @@ -0,0 +1,36 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_BKWND_HYPERLINK_DEF_HXX +#define _SVX_BKWND_HYPERLINK_DEF_HXX + +#define LERR_NOERROR 0 +#define LERR_NOENTRIES 1 +#define LERR_DOCNOTOPEN 2 + +#endif + diff --git a/cui/source/inc/hltpbase.hxx b/cui/source/inc/hltpbase.hxx new file mode 100644 index 000000000000..2adb0dbdd920 --- /dev/null +++ b/cui/source/inc/hltpbase.hxx @@ -0,0 +1,208 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_TABBASE_HYPERLINK_HXX +#define _SVX_TABBASE_HYPERLINK_HXX + +#define INET_TELNET_SCHEME "telnet://" + +#include <sfx2/app.hxx> +#include <sfx2/tabdlg.hxx> +#include <vcl/group.hxx> +#include <vcl/button.hxx> +#include <vcl/fixed.hxx> +#include <vcl/combobox.hxx> +#include <vcl/edit.hxx> +#include <vcl/lstbox.hxx> +#include <tools/urlobj.hxx> +#include <svl/stritem.hxx> +#include <svl/eitem.hxx> +#include <svtools/transfer.hxx> +#include <sfx2/dispatch.hxx> +#include <vcl/msgbox.hxx> +#include <sfx2/fcontnr.hxx> +#include <svtools/inettbc.hxx> +#include <vcl/timer.hxx> + +#include <dialmgr.hxx> +#include <sfx2/docfile.hxx> +#include <cuires.hrc> +#include <com/sun/star/frame/XFrame.hpp> +#include "helpid.hrc" +#include <svx/hlnkitem.hxx> + +#include "hlmarkwn.hxx" +#include "iconcdlg.hxx" + + +/************************************************************************* +|* +|* ComboBox-Control, wich is filled with all current framenames +|* +\************************************************************************/ + +class SvxFramesComboBox : public ComboBox +{ +public: + SvxFramesComboBox (Window* pParent, const ResId& rResId, SfxDispatcher* pDispatch); + ~SvxFramesComboBox (); +}; + +/************************************************************************* +|* +|* ComboBox-Control for URL's with History and Autocompletion +|* +\************************************************************************/ + +class SvxHyperURLBox : public SvtURLBox, public DropTargetHelper +{ +private: + BOOL mbAccessAddress; + +// String GetAllEmailNamesFromDragItem( USHORT nItem ); + +protected: + + virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ); + virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ); + + virtual long Notify( NotifyEvent& rNEvt ); + virtual void Select(); + virtual void Modify(); + virtual long PreNotify( NotifyEvent& rNEvt ); + +public: + SvxHyperURLBox( Window* pParent, INetProtocol eSmart = INET_PROT_FILE, BOOL bAddresses = FALSE ); + +}; + +/************************************************************************* +|* +|* Tabpage : Basisclass +|* +\************************************************************************/ + +class SvxHyperlinkTabPageBase : public IconChoicePage +{ +private: + FixedLine *mpGrpMore; + FixedText *mpFtFrame; + SvxFramesComboBox *mpCbbFrame; + FixedText *mpFtForm; + ListBox *mpLbForm; + FixedText *mpFtIndication; + Edit *mpEdIndication; + FixedText *mpFtText; + Edit *mpEdText; + ImageButton *mpBtScript; + + sal_Bool mbIsCloseDisabled; + + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > + mxDocumentFrame; + +protected: + Window* mpDialog; + + BOOL mbStdControlsInit; + + String maStrInitURL; + + Timer maTimer; + + SvxHlinkDlgMarkWnd* mpMarkWnd; + + void InitStdControls (); + virtual void FillStandardDlgFields ( SvxHyperlinkItem* pHyperlinkItem ); + virtual void FillDlgFields ( String& aStrURL ) = 0; + virtual void GetCurentItemData ( String& aStrURL, String& aStrName, + String& aStrIntName, String& aStrFrame, + SvxLinkInsertMode& eMode ) = 0; + virtual String CreateUiNameFromURL( const String& aStrURL ); + + void GetDataFromCommonFields( String& aStrName, + String& aStrIntName, String& aStrFrame, + SvxLinkInsertMode& eMode ); + + DECL_LINK (ClickScriptHdl_Impl, void * ); // Button : Script + + String aEmptyStr; + + BOOL FileExists( const INetURLObject& rURL ); + static String GetSchemeFromURL( String aStrURL ); + + inline void DisableClose( sal_Bool _bDisable ) { mbIsCloseDisabled = _bDisable; } + +public: + SvxHyperlinkTabPageBase ( + Window *pParent, + const ResId &rResId, + const SfxItemSet& rItemSet + ); + virtual ~SvxHyperlinkTabPageBase (); + + void SetDocumentFrame( + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame ) + { + mxDocumentFrame = rxDocumentFrame; + } + + virtual BOOL AskApply (); + virtual void DoApply (); + virtual void SetOnlineMode( BOOL bEnable ); + virtual void SetInitFocus(); + virtual void SetMarkStr ( String& aStrMark ); + virtual void Reset( const SfxItemSet& ); + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void ActivatePage( const SfxItemSet& rItemSet ); + virtual int DeactivatePage( SfxItemSet* pSet = 0 ); + + BOOL IsMarkWndVisible () { return ((Window*)mpMarkWnd)->IsVisible(); } + Size GetSizeExtraWnd () { return ( mpMarkWnd->GetSizePixel() ); } + BOOL MoveToExtraWnd ( Point aNewPos, BOOL bDisConnectDlg = FALSE ); + + virtual void ActivatePage(); + virtual void DeactivatePage(); + virtual sal_Bool QueryClose(); + +protected: + virtual BOOL ShouldOpenMarkWnd(); + virtual void SetMarkWndShouldOpen(BOOL bOpen); + + void ShowMarkWnd (); + void HideMarkWnd () { ( ( Window* ) mpMarkWnd )->Hide(); } + void InvalidateMarkWnd () { ( ( Window* ) mpMarkWnd )->Invalidate(); } + + SfxDispatcher* GetDispatcher() const; + + USHORT GetMacroEvents(); + SvxMacroTableDtor* GetMacroTable(); + + BOOL IsHTMLDoc() const; +}; + +#endif // _SVX_TABBASE_HYPERLINK_HXX + diff --git a/cui/source/inc/hyphen.hxx b/cui/source/inc/hyphen.hxx new file mode 100644 index 000000000000..502b212c8a91 --- /dev/null +++ b/cui/source/inc/hyphen.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_HYPHEN_HXX +#define _SVX_HYPHEN_HXX + +// include --------------------------------------------------------------- + +#include <memory> + +#include <vcl/edit.hxx> +#include <vcl/button.hxx> +#include <vcl/fixed.hxx> +#include <sfx2/basedlgs.hxx> +#include <com/sun/star/uno/Reference.hxx> + +// forward --------------------------------------------------------------- + +namespace com{namespace sun{namespace star{ +namespace linguistic2{ + class XHyphenator; + class XPossibleHyphens; +}}}} + +class SvxSpellWrapper; + +// class SvxHyphenWordDialog --------------------------------------------- + +struct SvxHyphenWordDialog_Impl; + +class SvxHyphenWordDialog : public SfxModalDialog +{ + std::auto_ptr< SvxHyphenWordDialog_Impl > m_pImpl; + +public: + SvxHyphenWordDialog( const String &rWord, LanguageType nLang, + Window* pParent, + ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenator > &xHyphen, + SvxSpellWrapper* pWrapper ); + virtual ~SvxHyphenWordDialog(); + + void SetWindowTitle( LanguageType nLang ); + void SelLeft(); + void SelRight(); +}; + + +#endif + diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx new file mode 100644 index 000000000000..35f010583fb9 --- /dev/null +++ b/cui/source/inc/iconcdlg.hxx @@ -0,0 +1,270 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _ICCDLG_HXX +#define _ICCDLG_HXX + +#include <vcl/tabpage.hxx> +#include <vcl/msgbox.hxx> +#include <vcl/dialog.hxx> +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +#include <vcl/image.hxx> +#include <svtools/ivctrl.hxx> +#include <svl/itempool.hxx> +#include <svl/itemset.hxx> +#include <tools/list.hxx> +#include <tools/string.hxx> + +#define CTRLS_OFFSET 3 +#define BUTTON_DISTANCE 8 +#define RET_USER 100 +#define RET_USER_CANCEL 101 + +// forward-declarations +struct IconChoicePageData; +class IconChoiceDialog; +class IconChoicePage; + +// Create-Function +typedef IconChoicePage* (*CreatePage)(Window *pParent, const SfxItemSet &rAttrSet); +typedef USHORT* (*GetPageRanges)(); // liefert internationale Which-Wert + +// page-list +DECLARE_LIST( IconChoicePageList, IconChoicePageData * ) + +// position of iconchoicectrl +enum EIconChoicePos { PosLeft, PosRight, PosTop, PosBottom }; + +/********************************************************************** +| +| Data-structure for pages in dialog +| +\**********************************************************************/ + +struct IconChoicePageData +{ + USHORT nId; // Die ID + CreatePage fnCreatePage; // Pointer auf die Factory + GetPageRanges fnGetRanges;// Pointer auf die Ranges-Funktion + IconChoicePage* pPage; // die TabPage selber + BOOL bOnDemand; // Flag: ItemSet onDemand + BOOL bRefresh; // Flag: Seite mu\s neu initialisiert werden + + // Konstruktor + IconChoicePageData( USHORT Id, CreatePage fnPage, GetPageRanges fnRanges, BOOL bDemand ) + : nId ( Id ), + fnCreatePage ( fnPage ), + fnGetRanges ( fnRanges ), + pPage ( NULL ), + bOnDemand ( bDemand ), + bRefresh ( FALSE ) + {} +}; + +/********************************************************************** +| +| IconChoicePage +| +\**********************************************************************/ + +class IconChoicePage : public TabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + +private : + const SfxItemSet* pSet; + String aUserString; + BOOL bHasExchangeSupport; + IconChoiceDialog* pDialog; + BOOL bStandard; + + void SetDialog( IconChoiceDialog* pNew ) { pDialog = pNew; } + IconChoiceDialog* GetDialog() const { return pDialog; } + + void SetInputSet( const SfxItemSet* pNew ) { pSet = pNew; } + + void ImplInitSettings(); + +protected : + IconChoicePage( Window *pParent, const ResId &, const SfxItemSet &rAttrSet ); + + USHORT GetSlot( USHORT nWhich ) const { return pSet->GetPool()->GetSlotId( nWhich ); } + USHORT GetWhich( USHORT nSlot ) const { return pSet->GetPool()->GetWhich( nSlot ); } + +public : + virtual ~IconChoicePage(); + + const SfxItemSet& GetItemSet() const { return *pSet; } + + virtual BOOL FillItemSet( SfxItemSet& ) = 0; + virtual void Reset( const SfxItemSet& ) = 0; + + BOOL HasExchangeSupport() const { return bHasExchangeSupport; } + void SetExchangeSupport( BOOL bNew = TRUE ) { bHasExchangeSupport = bNew; } + + enum { + KEEP_PAGE = 0x0000, // Fehlerbehandlung; Seite nicht wechseln + // 2. F"ullen eines ItemSets f"ur die Aktualilsierung + // "ubergeordneter Beispiele; dieser Pointer kann immer + // NULL sein!! + LEAVE_PAGE = 0x0001, + // Set aktualisieren und andere Page aktualisieren + REFRESH_SET = 0x0002 + }; + + virtual void ActivatePage( const SfxItemSet& ); + virtual int DeactivatePage( SfxItemSet* pSet = 0 ); + void SetUserData(const String& rString) { aUserString = rString; } + String GetUserData() { return aUserString; } + virtual void FillUserData(); + virtual BOOL IsReadOnly() const; + virtual sal_Bool QueryClose(); + + void StateChanged( StateChangedType nType ); + void DataChanged( const DataChangedEvent& rDCEvt ); +}; + +/********************************************************************** +| +| IconChoiceDialog +| +\**********************************************************************/ + +class IconChoiceDialog : public ModalDialog +{ +private : + friend class IconChoicePage; + + EIconChoicePos meChoicePos; // Position des IconChoiceCtrl's + IconChoicePageList maPageList; // Liste von PageData-Pointer + + SvtIconChoiceCtrl maIconCtrl; // DAS IconChoice-Control + + USHORT mnCurrentPageId; // Id der aktuell sichtbaren Page + + // Buttons + OKButton aOKBtn; + CancelButton aCancelBtn; + HelpButton aHelpBtn; + PushButton aResetBtn; + + const SfxItemSet* pSet; + SfxItemSet* pOutSet; + SfxItemSet* pExampleSet; + USHORT* pRanges; + + sal_uInt32 nResId; + + BOOL bHideResetBtn; + BOOL bModal; + BOOL bInOK; + BOOL bModified; + BOOL bItemsReset; + + DECL_LINK ( ChosePageHdl_Impl, void * ); + DECL_LINK ( OkHdl, Button * ); + DECL_LINK ( ResetHdl, Button * ); + DECL_LINK ( CancelHdl, Button * ); + + IconChoicePageData* GetPageData ( USHORT nId ); + void Start_Impl(); + BOOL OK_Impl(); + + void SetPosSizeCtrls ( BOOL bInit = FALSE ); + void SetPosSizePages ( USHORT nId ); + + void FocusOnIcon ( USHORT nId ); + +protected : + void ShowPageImpl ( IconChoicePageData* pData ); + void HidePageImpl ( IconChoicePageData* pData ); + + virtual void PageCreated( USHORT nId, IconChoicePage& rPage ); + virtual SfxItemSet* CreateInputItemSet( USHORT nId ); + inline SfxItemSet* GetInputSetImpl() { return (SfxItemSet*)pSet; } + inline IconChoicePage* GetTabPage( USHORT nPageId ) + { return ( GetPageData (nPageId)->pPage?GetPageData (nPageId)->pPage:NULL); } + const SfxItemSet* GetRefreshedSet(); + + void ActivatePageImpl (); + BOOL DeActivatePageImpl (); + void ResetPageImpl (); + + short Ok(); + +public : + + // im Ctor knnte auch die Position des IconChoiceCtrl's gesetzt werden. + + IconChoiceDialog ( Window* pParent, const ResId &rResId, + const EIconChoicePos ePos = PosLeft, const SfxItemSet * pItemSet = 0 ); + ~IconChoiceDialog (); + + /////////////////////////////////////////////////////////////////////////////////// + // virtuelle Methoden + // + virtual void Paint( const Rectangle& rRect ); + virtual void Resize(); + + /////////////////////////////////////////////////////////////////////////////////// + // Schnittstelle + // + + SvxIconChoiceCtrlEntry* AddTabPage( + USHORT nId, const String& rIconText, const Image& rChoiceIcon, const Image& rChoiceIconHC, + CreatePage pCreateFunc /* != NULL */, GetPageRanges pRangesFunc = NULL /* NULL allowed*/, + BOOL bItemsOnDemand = FALSE, ULONG nPos = LIST_APPEND ); + + void SetCurPageId( USHORT nId ) { mnCurrentPageId = nId; FocusOnIcon( nId ); } + USHORT GetCurPageId() const { return mnCurrentPageId; } + void ShowPage( USHORT nId ); + + // liefert ggf. per Map konvertierte lokale Slots + const USHORT* GetInputRanges( const SfxItemPool& ); + void SetInputSet( const SfxItemSet* pInSet ); + const SfxItemSet* GetOutputItemSet() const { return pOutSet; } + + const OKButton& GetOKButton() const { return aOKBtn; } + OKButton& GetOKButton() { return aOKBtn; } + const CancelButton& GetCancelButton() const { return aCancelBtn; } + CancelButton& GetCancelButton() { return aCancelBtn; } + const HelpButton& GetHelpButton() const { return aHelpBtn; } + HelpButton& GetHelpButton() { return aHelpBtn; } + + short Execute(); + void Start( BOOL bShow = TRUE ); + sal_Bool QueryClose(); + + const SfxItemSet* GetExampleSet() const { return pExampleSet; } + + EIconChoicePos SetCtrlPos ( const EIconChoicePos& rPos ); +}; + +#endif //_ICCDLG_HXX + diff --git a/cui/source/inc/insdlg.hxx b/cui/source/inc/insdlg.hxx new file mode 100644 index 000000000000..a93b93498d37 --- /dev/null +++ b/cui/source/inc/insdlg.hxx @@ -0,0 +1,212 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_INSDLG_HXX +#define _SVX_INSDLG_HXX + +#include <com/sun/star/uno/Reference.h> +#include <com/sun/star/embed/XEmbeddedObject.hpp> +#include <com/sun/star/embed/XEmbeddedObject.hpp> +#include <com/sun/star/embed/XStorage.hpp> + +#include <svtools/insdlg.hxx> +#include <vcl/dialog.hxx> +#include <vcl/fixed.hxx> +#include <vcl/button.hxx> +#include <vcl/field.hxx> +#include <vcl/edit.hxx> +#include <vcl/lstbox.hxx> +#include <svtools/svmedit.hxx> // MultiLineEdit +#include <comphelper/embeddedobjectcontainer.hxx> + +class INetURLObject; + +class InsertObjectDialog_Impl : public ModalDialog +{ +protected: + com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > m_xObj; + const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& m_xStorage; + comphelper::EmbeddedObjectContainer aCnt; + + InsertObjectDialog_Impl( Window * pParent, const ResId & rResId, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage ); +public: + com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetObject() + { return m_xObj; } + virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetIconIfIconified( ::rtl::OUString* pGraphicMediaType ); + virtual BOOL IsCreateNew() const; +}; + +class SvInsertOleDlg : public InsertObjectDialog_Impl +{ + RadioButton aRbNewObject; + RadioButton aRbObjectFromfile; + ListBox aLbObjecttype; + Edit aEdFilepath; + PushButton aBtnFilepath; + CheckBox aCbFilelink; + FixedLine aGbObject; + OKButton aOKButton1; + CancelButton aCancelButton1; + HelpButton aHelpButton1; + String aStrFile; + String _aOldStr; + const SvObjectServerList* m_pServers; + + ::com::sun::star::uno::Sequence< sal_Int8 > m_aIconMetaFile; + ::rtl::OUString m_aIconMediaType; + + DECL_LINK( DoubleClickHdl, ListBox* ); + DECL_LINK( BrowseHdl, PushButton* ); + DECL_LINK( RadioHdl, RadioButton* ); + void SelectDefault(); + ListBox& GetObjectTypes() + { return aLbObjecttype; } + String GetFilePath() const { return aEdFilepath.GetText(); } + BOOL IsLinked() const { return aCbFilelink.IsChecked(); } + BOOL IsCreateNew() const { return aRbNewObject.IsChecked(); } + +public: + SvInsertOleDlg( Window* pParent, + const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage, + const SvObjectServerList* pServers = NULL ); + virtual short Execute(); + + // get replacement for the iconified embedded object and the mediatype of the replacement + ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetIconIfIconified( ::rtl::OUString* pGraphicMediaType ); +}; + +// class SvInsertPlugInDialog -------------------------------------------- + +class SvInsertPlugInDialog : public InsertObjectDialog_Impl +{ +private: + Edit aEdFileurl; + PushButton aBtnFileurl; + FixedLine aGbFileurl; + MultiLineEdit aEdPluginsOptions; + FixedLine aGbPluginsOptions; + OKButton aOKButton1; + CancelButton aCancelButton1; + HelpButton aHelpButton1; + INetURLObject* m_pURL; + String m_aCommands; + + DECL_LINK( BrowseHdl, PushButton * ); + String GetPlugInFile() const { return aEdFileurl.GetText(); } + String GetPlugInOptions() const { return aEdPluginsOptions.GetText(); } + +public: + SvInsertPlugInDialog( Window* pParent, + const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage ); + + ~SvInsertPlugInDialog(); + + virtual short Execute(); +}; + +// class SvInsertAppletDialog -------------------------------------------- + +class SvInsertAppletDialog : public InsertObjectDialog_Impl +{ +private: + FixedText aFtClassfile; + Edit aEdClassfile; + FixedText aFtClasslocation; + Edit aEdClasslocation; + PushButton aBtnClass; + FixedLine aGbClass; + MultiLineEdit aEdAppletOptions; + FixedLine aGbAppletOptions; + OKButton aOKButton1; + CancelButton aCancelButton1; + HelpButton aHelpButton1; + INetURLObject* m_pURL; + String m_aClass; + String m_aCommands; + String GetClass() const { return aEdClassfile.GetText(); } + String GetClassLocation() const { return aEdClasslocation.GetText(); } + String GetAppletOptions() const { return aEdAppletOptions.GetText(); } + + void SetClass( const String &rClass ) { aEdClassfile.SetText(rClass); } + void SetClassLocation( const String &rLocation ) { aEdClasslocation.SetText(rLocation); } + void SetAppletOptions( const String &rOptions ) { aEdAppletOptions.SetText(rOptions); } + DECL_LINK( BrowseHdl, PushButton * ); + +public: + SvInsertAppletDialog( Window* pParent, + const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage ); + SvInsertAppletDialog( Window* pParent, + const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& xObj ); + ~SvInsertAppletDialog(); + + virtual short Execute(); +}; + +class SfxInsertFloatingFrameDialog : public InsertObjectDialog_Impl +{ +private: + FixedText aFTName; + Edit aEDName; + FixedText aFTURL; + Edit aEDURL; + PushButton aBTOpen; + + RadioButton aRBScrollingOn; + RadioButton aRBScrollingOff; + RadioButton aRBScrollingAuto; + FixedLine aFLScrolling; + + FixedLine aFLSepLeft; + RadioButton aRBFrameBorderOn; + RadioButton aRBFrameBorderOff; + FixedLine aFLFrameBorder; + + FixedLine aFLSepRight; + FixedText aFTMarginWidth; + NumericField aNMMarginWidth; + CheckBox aCBMarginWidthDefault; + FixedText aFTMarginHeight; + NumericField aNMMarginHeight; + CheckBox aCBMarginHeightDefault; + FixedLine aFLMargin; + + OKButton aOKButton1; + CancelButton aCancelButton1; + HelpButton aHelpButton1; + + DECL_STATIC_LINK( SfxInsertFloatingFrameDialog, OpenHdl, PushButton* ); + DECL_STATIC_LINK( SfxInsertFloatingFrameDialog, CheckHdl, CheckBox* ); + +public: + SfxInsertFloatingFrameDialog( Window *pParent, + const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage ); + SfxInsertFloatingFrameDialog( Window* pParent, + const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& xObj ); + virtual short Execute(); +}; + +#endif // _SVX_INSDLG_HXX + diff --git a/cui/source/inc/insrc.hxx b/cui/source/inc/insrc.hxx new file mode 100644 index 000000000000..f75ab2471923 --- /dev/null +++ b/cui/source/inc/insrc.hxx @@ -0,0 +1,69 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_INSRC_HXX +#define _SVX_INSRC_HXX + +#include <svx/stddlg.hxx> + +#include <vcl/fixed.hxx> +#include <vcl/field.hxx> +#include <vcl/button.hxx> +#include <vcl/group.hxx> +#include <vcl/button.hxx> + +#include <tools/string.hxx> + +class SvxInsRowColDlg : public SvxAbstractInsRowColDlg, public ModalDialog +{ + FixedText aCount; + NumericField aCountEdit; + FixedLine aInsFL; + + RadioButton aBeforeBtn; + RadioButton aAfterBtn; + FixedLine aPosFL; + + String aRow; + String aCol; + + OKButton aOKBtn; + CancelButton aCancelBtn; + HelpButton aHelpBtn; + + bool bColumn; + +public: + SvxInsRowColDlg( Window* pParent, bool bCol, const rtl::OString& sHelpId ); + + virtual short Execute(void); + + virtual bool isInsertBefore() const; + virtual sal_uInt16 getInsertCount() const; +}; + +#endif + diff --git a/cui/source/inc/internationaloptions.hxx b/cui/source/inc/internationaloptions.hxx new file mode 100644 index 000000000000..f95be661f53c --- /dev/null +++ b/cui/source/inc/internationaloptions.hxx @@ -0,0 +1,58 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _OFFAPP_INTERNATIONALOPTIONS_HXX_ +#define _OFFAPP_INTERNATIONALOPTIONS_HXX_ + +#include <sfx2/tabdlg.hxx> +#include <vcl/fixed.hxx> + +namespace offapp +{ + class InternationalOptionsPage : public SfxTabPage + { + private: + struct IMPL; + IMPL* m_pImpl; + + protected: + InternationalOptionsPage( Window* _pParent, const SfxItemSet& _rAttrSet ); + + virtual BOOL FillItemSet( SfxItemSet& _rSet ); + virtual void Reset( const SfxItemSet& _rSet ); + + public: + virtual ~InternationalOptionsPage(); + + static SfxTabPage* CreateSd( Window* _pParent, const SfxItemSet& _rAttrSet ); + static SfxTabPage* CreateSc( Window* _pParent, const SfxItemSet& _rAttrSet ); + }; + +} // /namespace offapp + +#endif + diff --git a/cui/source/inc/labdlg.hxx b/cui/source/inc/labdlg.hxx new file mode 100644 index 000000000000..95e30d241467 --- /dev/null +++ b/cui/source/inc/labdlg.hxx @@ -0,0 +1,144 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_LABDLG_HXX +#define _SVX_LABDLG_HXX + +// include --------------------------------------------------------------- + + +#ifndef _FIELD_HXX //autogen +#include <vcl/field.hxx> +#endif +#ifndef _LSTBOX_HXX //autogen +#include <vcl/lstbox.hxx> +#endif +#ifndef _FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif +#include <svtools/valueset.hxx> +#include <sfx2/tabdlg.hxx> +class SdrView; + +// class SvxCaptionTabPage ----------------------------------------------- + +const sal_uInt16 CAPTYPE_BITMAPS_COUNT = 3; + +class SvxCaptionTabPage : public SfxTabPage +{ +private: + ValueSet aCT_CAPTTYPE; + FixedText aFT_ABSTAND; + MetricField aMF_ABSTAND; + FixedText aFT_WINKEL; + ListBox aLB_WINKEL; + FixedText aFT_ANSATZ; + ListBox aLB_ANSATZ; + FixedText aFT_UM; + MetricField aMF_ANSATZ; + FixedText aFT_ANSATZ_REL; + ListBox aLB_ANSATZ_REL; + FixedText aFT_LAENGE; + MetricField aMF_LAENGE; + CheckBox aCB_LAENGE; + + Image* mpBmpCapTypes[CAPTYPE_BITMAPS_COUNT]; + Image* mpBmpCapTypesH[CAPTYPE_BITMAPS_COUNT]; + + String aStrHorzList; + String aStrVertList; + + short nCaptionType; + BOOL bFixedAngle; + INT32 nFixedAngle; + INT32 nGap; + short nEscDir; + BOOL bEscRel; + INT32 nEscAbs; + INT32 nEscRel; + INT32 nLineLen; + BOOL bFitLineLen; + + USHORT nAnsatzRelPos; + USHORT nAnsatzTypePos; + USHORT nWinkelTypePos; + +#ifdef _SVX_LABDLG_CXX + void SetupAnsatz_Impl( USHORT nType ); + void SetupType_Impl( USHORT nType ); + DECL_LINK( AnsatzSelectHdl_Impl, ListBox * ); + DECL_LINK( AnsatzRelSelectHdl_Impl, ListBox * ); + DECL_LINK( LineOptHdl_Impl, Button * ); + DECL_LINK( SelectCaptTypeHdl_Impl, void * ); +#endif + + const SfxItemSet& rOutAttrs; + const SdrView* pView; + +public: + SvxCaptionTabPage( Window* pParent, const SfxItemSet& rInAttrs ); + virtual ~SvxCaptionTabPage(); + + static SfxTabPage* Create( Window*, const SfxItemSet& ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet & ); + void Construct(); + void SetView( const SdrView* pSdrView ) + { pView = pSdrView; } + + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + void FillValueSet(); +}; + +// class SvxCaptionTabDialog --------------------------------------------- + +class SvxCaptionTabDialog : public SfxTabDialog +{ +private: +// const SfxItemSet& rOutAttrs; + const SdrView* pView; + USHORT nAnchorCtrls; + + Link aValidateLink; + + virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + +public: + + SvxCaptionTabDialog(Window* pParent, const SdrView* pView, + USHORT nAnchorTypes = 0 ); + + ~SvxCaptionTabDialog(); + + //link for the Writer to validate positions + void SetValidateFramePosLink( const Link& rLink ); +}; + + +#endif //_SVX_LABDLG_HXX + diff --git a/cui/source/inc/linkdlg.hxx b/cui/source/inc/linkdlg.hxx new file mode 100644 index 000000000000..f6f75ddee89d --- /dev/null +++ b/cui/source/inc/linkdlg.hxx @@ -0,0 +1,134 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _LINKDLG_HXX +#define _LINKDLG_HXX + +#ifndef _LSTBOX_HXX //autogen +#include <vcl/lstbox.hxx> +#endif + +#include <vcl/dialog.hxx> +#include <vcl/fixed.hxx> +#include <vcl/button.hxx> +#include <vcl/edit.hxx> +#include <vcl/lstbox.hxx> + +#include <svtools/svmedit.hxx> // MultiLineEdit +#include <svtools/svtabbx.hxx> // MultiLineEdit + +/********************** SvUpdateLinksDialog ****************************** +*************************************************************************/ +namespace sfx2 +{ + class LinkManager; + class SvBaseLink; +} + +class SvBaseLinksDlg : public ModalDialog +{ + using Window::SetType; + + FixedText aFtFiles; + FixedText aFtLinks; + FixedText aFtType; + FixedText aFtStatus; + CancelButton aCancelButton1; + HelpButton aHelpButton1; + PushButton aPbUpdateNow; + PushButton aPbOpenSource; + PushButton aPbChangeSource; + PushButton aPbBreakLink; + FixedText aFtFiles2; + FixedText aFtSource2; + FixedText aFtType2; + FixedText aFtUpdate; + RadioButton aRbAutomatic; + RadioButton aRbManual; + FixedText aFtFullFileName; + FixedText aFtFullSourceName; + FixedText aFtFullTypeName; + String aStrAutolink; + String aStrManuallink; + String aStrBrokenlink; + String aStrGraphiclink; + String aStrButtonclose; + String aStrCloselinkmsg; + String aStrCloselinkmsgMulti; + String aStrWaitinglink; + sfx2::LinkManager* pLinkMgr; + BOOL bHtmlMode; + SvTabListBox aTbLinks; + Timer aUpdateTimer; + +#if _SOLAR__PRIVATE + DECL_LINK( LinksSelectHdl, SvTabListBox * ); + DECL_LINK( LinksDoubleClickHdl, SvTabListBox * ); + DECL_LINK( AutomaticClickHdl, RadioButton * ); + DECL_LINK( ManualClickHdl, RadioButton * ); + DECL_LINK( UpdateNowClickHdl, PushButton * ); + DECL_LINK( OpenSourceClickHdl, PushButton * ); + DECL_LINK( ChangeSourceClickHdl, PushButton * ); + DECL_LINK( BreakLinkClickHdl, PushButton * ); + DECL_LINK( UpdateWaitingHdl, Timer * ); + DECL_LINK( EndEditHdl, sfx2::SvBaseLink* ); + sfx2::SvBaseLink* GetSelEntry( USHORT* pPos ); + String ImplGetStateStr( const sfx2::SvBaseLink& ); + void SetType( sfx2::SvBaseLink& rLink, USHORT nPos, USHORT nType ); + void InsertEntry( const sfx2::SvBaseLink& rLink, USHORT nPos = LISTBOX_APPEND, sal_Bool bSelect = sal_False); +#endif + + void StartUpdateTimer() { aUpdateTimer.Start(); } + + SvTabListBox& Links() { return aTbLinks; } + FixedText& FileName() { return aFtFullFileName; } + FixedText& SourceName() { return aFtFullSourceName; } + FixedText& TypeName() { return aFtFullTypeName; } + RadioButton& Automatic() { return aRbAutomatic; } + RadioButton& Manual() { return aRbManual; } + PushButton& UpdateNow() { return aPbUpdateNow; } + PushButton& OpenSource() { return aPbOpenSource; } + PushButton& ChangeSource() { return aPbChangeSource; } + PushButton& BreakLink() { return aPbBreakLink; } + + String& Autolink() { return aStrAutolink; } + String& Manuallink() { return aStrManuallink; } + String& Brokenlink() { return aStrBrokenlink; } + String& Graphiclink() { return aStrGraphiclink; } + String& Buttonclose() { return aStrButtonclose; } + String& Closelinkmsg() { return aStrCloselinkmsg; } + String& CloselinkmsgMulti() { return aStrCloselinkmsgMulti; } + String& Waitinglink() { return aStrWaitinglink; } + void SetManager( sfx2::LinkManager* ); + +public: + SvBaseLinksDlg( Window * pParent, sfx2::LinkManager*, BOOL bHtml = FALSE ); + ~SvBaseLinksDlg(); + void SetActLink( sfx2::SvBaseLink * pLink ); +}; + +#endif // _LINKDLG_HXX diff --git a/cui/source/inc/macroass.hxx b/cui/source/inc/macroass.hxx new file mode 100644 index 000000000000..45cf2fdbf79e --- /dev/null +++ b/cui/source/inc/macroass.hxx @@ -0,0 +1,134 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _MACROASS_HXX +#define _MACROASS_HXX + +#include "sal/config.h" + +#include <sfx2/basedlgs.hxx> +#include <sfx2/tabdlg.hxx> +#include <svl/macitem.hxx> +#include <vcl/lstbox.hxx> +#include <com/sun/star/frame/XFrame.hpp> + +class _SfxMacroTabPage; +class SvStringsDtor; +class SvTabListBox; +class Edit; +class String; + +typedef SvStringsDtor* (*FNGetRangeHdl)( _SfxMacroTabPage*, const String& rLanguage ); +typedef SvStringsDtor* (*FNGetMacrosOfRangeHdl)( _SfxMacroTabPage*, const String& rLanguage, const String& rRange ); + +class SfxConfigGroupListBox_Impl; +class SfxConfigFunctionListBox_Impl; +class _HeaderTabListBox; +class _SfxMacroTabPage_Impl; + +class _SfxMacroTabPage : public SfxTabPage +{ + SvxMacroTableDtor aTbl; + DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectEvent_Impl, SvTabListBox * ); + DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectGroup_Impl, ListBox * ); + DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectMacro_Impl, ListBox * ); + + DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, DoubleClickHdl_Impl, Control* ); + DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton * ); + + DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, ChangeScriptHdl_Impl, RadioButton * ); + DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, TimeOut_Impl, Timer* ); + +protected: + _SfxMacroTabPage_Impl* mpImpl; + + _SfxMacroTabPage( Window* pParent, const ResId& rId, const SfxItemSet& rItemSet ); + + void InitAndSetHandler(); + void FillEvents(); + void FillMacroList(); + void EnableButtons( const String& rLanguage ); + +public: + + virtual ~_SfxMacroTabPage(); + + void AddEvent( const String & rEventName, USHORT nEventId ); + + const SvxMacroTableDtor& GetMacroTbl() const; + void SetMacroTbl( const SvxMacroTableDtor& rTbl ); + void ClearMacroTbl(); + + virtual void ScriptChanged( const String& rLanguage ); + virtual void PageCreated (SfxAllItemSet aSet); + + // --------- Erben aus der Basis ------------- + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + + BOOL IsReadOnly() const; +}; + +inline const SvxMacroTableDtor& _SfxMacroTabPage::GetMacroTbl() const +{ + return aTbl; +} + +inline void _SfxMacroTabPage::SetMacroTbl( const SvxMacroTableDtor& rTbl ) +{ + aTbl = rTbl; +} + +inline void _SfxMacroTabPage::ClearMacroTbl() +{ + aTbl.DelDtor(); +} + +class SfxMacroTabPage : public _SfxMacroTabPage +{ +public: + SfxMacroTabPage( + Window* pParent, + const ResId& rId, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame, + const SfxItemSet& rSet + ); + + // --------- Erben aus der Basis ------------- + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); +}; + +class SfxMacroAssignDlg : public SfxSingleTabDialog +{ +public: + SfxMacroAssignDlg( + Window* pParent, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame, + const SfxItemSet& rSet ); + virtual ~SfxMacroAssignDlg(); +}; + +#endif diff --git a/cui/source/inc/macropg.hxx b/cui/source/inc/macropg.hxx new file mode 100644 index 000000000000..0359a330c1f0 --- /dev/null +++ b/cui/source/inc/macropg.hxx @@ -0,0 +1,175 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _MACROPG_HXX +#define _MACROPG_HXX + +#include <sfx2/basedlgs.hxx> +#include <sfx2/tabdlg.hxx> + +#include <com/sun/star/container/XNameReplace.hpp> +#include <com/sun/star/util/XModifiable.hpp> +#include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/uno/Reference.hxx> +#include <svl/macitem.hxx> +#ifndef _LSTBOX_HXX //autogen +#include <vcl/lstbox.hxx> +#endif +#include <rtl/ustring.hxx> + +#include <hash_map> +#include <vector> + +typedef ::std::hash_map< ::rtl::OUString, ::std::pair< ::rtl::OUString, ::rtl::OUString >, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > EventsHash; + +struct EventDisplayName +{ + const sal_Char* pAsciiEventName; + USHORT nEventResourceID; + EventDisplayName() : pAsciiEventName( NULL ), nEventResourceID(0) { } + EventDisplayName( const sal_Char* _pAsciiName, const USHORT _nResId ) + : pAsciiEventName( _pAsciiName ) + , nEventResourceID( _nResId ) + { + } +}; +typedef ::std::vector< EventDisplayName > EventDisplayNames; + +class _SvxMacroTabPage; +class SvStringsDtor; +class SvTabListBox; +class Edit; +class String; + +class _HeaderTabListBox; +class _SvxMacroTabPage_Impl; + + +class _SvxMacroTabPage : public SfxTabPage +{ +#if _SOLAR__PRIVATE + DECL_STATIC_LINK( _SvxMacroTabPage, SelectEvent_Impl, SvTabListBox * ); + DECL_STATIC_LINK( _SvxMacroTabPage, AssignDeleteHdl_Impl, PushButton * ); + DECL_STATIC_LINK( _SvxMacroTabPage, DoubleClickHdl_Impl, SvTabListBox * ); + + static long GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton* pBtn ); + +#endif +protected: + _SvxMacroTabPage_Impl* mpImpl; + ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > m_xAppEvents; + ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > m_xDocEvents; + ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifiable > m_xModifiable; + EventsHash m_appEventsHash; + EventsHash m_docEventsHash; + bool bReadOnly, bDocModified, bAppEvents, bInitialized; + EventDisplayNames aDisplayNames; + + _SvxMacroTabPage( Window* pParent, const ResId& rId, const SfxItemSet& rItemSet ); + + void EnableButtons( const String& rLanguage ); + ::com::sun::star::uno::Any GetPropsByName( const ::rtl::OUString& eventName, EventsHash& eventsHash ); + ::std::pair< ::rtl::OUString, ::rtl::OUString > GetPairFromAny( ::com::sun::star::uno::Any aAny ); + +public: + + virtual ~_SvxMacroTabPage(); + void InitResources(); + + void InitAndSetHandler( ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > xAppEvents, ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > xDocEvents, ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifiable > xModifiable ); + virtual BOOL FillItemSet( SfxItemSet& rSet ); + + using SfxTabPage::Reset; + virtual void Reset(); + + void DisplayAppEvents( bool appEvents); + void SetReadOnly( BOOL bSet ); + BOOL IsReadOnly() const; +}; + +class SvxMacroTabPage : public _SvxMacroTabPage +{ +public: + SvxMacroTabPage( + Window* pParent, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxDocumentFrame, + const SfxItemSet& rSet, + ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > xNameReplace, + sal_uInt16 nSelectedIndex + ); + virtual ~SvxMacroTabPage(); +}; + +// class SvxMacroAssignDlg -------------------------------------------------- + +typedef USHORT* (*GetTabPageRanges)(); // liefert internationale Which-Werte + +class SvxMacroAssignSingleTabDialog : public SfxModalDialog +{ +public: + SvxMacroAssignSingleTabDialog( Window* pParent, const SfxItemSet& rOptionsSet, USHORT nUniqueId ); + + virtual ~SvxMacroAssignSingleTabDialog(); + + void SetTabPage( SfxTabPage* pTabPage ); + // SfxTabPage* GetTabPage() const { return pPage; } + + // OKButton* GetOKButton() const { return pOKBtn; } + // CancelButton* GetCancelButton() const { return pCancelBtn; } + +private: + SfxViewFrame* pFrame; + + FixedLine* pFixedLine; + + OKButton* pOKBtn; + CancelButton* pCancelBtn; + HelpButton* pHelpBtn; + + SfxTabPage* pPage; + const SfxItemSet* pOptions; + SfxItemSet* pOutSet; + +#if _SOLAR__PRIVATE + DECL_DLLPRIVATE_LINK( OKHdl_Impl, Button * ); +#endif +}; + + +class SvxMacroAssignDlg : public SvxMacroAssignSingleTabDialog +{ +public: + SvxMacroAssignDlg( + Window* pParent, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxDocumentFrame, + const SfxItemSet& rSet, + const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace >& xNameReplace, + sal_uInt16 nSelectedIndex + ); + virtual ~SvxMacroAssignDlg(); +}; + +#endif diff --git a/cui/source/inc/measure.hxx b/cui/source/inc/measure.hxx new file mode 100644 index 000000000000..ddc6f62e6e8a --- /dev/null +++ b/cui/source/inc/measure.hxx @@ -0,0 +1,127 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_MEASURE_HXX +#define _SVX_MEASURE_HXX + +// include --------------------------------------------------------------- + +#include <vcl/fixed.hxx> +#include <vcl/group.hxx> +#include <sfx2/basedlgs.hxx> +#include <svx/dlgctrl.hxx> +#include <svx/measctrl.hxx> + +class SdrView; + +/************************************************************************* +|* +|* Dialog zum "Andern von TextAttributen +|* +\************************************************************************/ + +class SvxMeasurePage : public SvxTabPage +{ +private: + + FixedLine aFlLine; + FixedText aFtLineDist; + MetricField aMtrFldLineDist; + FixedText aFtHelplineOverhang; + MetricField aMtrFldHelplineOverhang; + FixedText aFtHelplineDist; + MetricField aMtrFldHelplineDist; + FixedText aFtHelpline1Len; + MetricField aMtrFldHelpline1Len; + FixedText aFtHelpline2Len; + MetricField aMtrFldHelpline2Len; + TriStateBox aTsbBelowRefEdge; + FixedText aFtDecimalPlaces; + MetricField aMtrFldDecimalPlaces; + + FixedLine aFlLabel; + FixedText aFtPosition; + SvxRectCtl aCtlPosition; + TriStateBox aTsbAutoPosV; + TriStateBox aTsbAutoPosH; + TriStateBox aTsbShowUnit; + ListBox aLbUnit; + TriStateBox aTsbParallel; + + SvxXMeasurePreview aCtlPreview; + + FixedLine aFlVert; + + const SfxItemSet& rOutAttrs; + SfxItemSet aAttrSet; + const SdrView* pView; + SfxMapUnit eUnit; + + BOOL bPositionModified; + +#ifdef _SVX_MEASURE_CXX + void FillUnitLB(); + + DECL_LINK( ClickAutoPosHdl_Impl, void * ); + DECL_LINK( ChangeAttrHdl_Impl, void * ); +#endif + +public: + + SvxMeasurePage( Window* pWindow, const SfxItemSet& rInAttrs ); + ~SvxMeasurePage(); + + static SfxTabPage* Create( Window*, const SfxItemSet& ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet & ); + + virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); + + void Construct(); + void SetView( const SdrView* pSdrView ) { pView = pSdrView; } + virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001 +}; + +/************************************************************************* +|* +|* Von SfxSingleTabDialog abgeleitet, um vom Control "uber virtuelle Methode +|* benachrichtigt werden zu k"onnen. +|* +\************************************************************************/ + +class SvxMeasureDialog : public SfxSingleTabDialog +{ +public: + SvxMeasureDialog( Window* pParent, const SfxItemSet& rAttr, + const SdrView* pView ); + ~SvxMeasureDialog(); +}; + + +#endif // _SVX_MEASURE_HXX + diff --git a/cui/source/inc/multifil.hxx b/cui/source/inc/multifil.hxx new file mode 100644 index 000000000000..8d86e99b731c --- /dev/null +++ b/cui/source/inc/multifil.hxx @@ -0,0 +1,59 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_MULTIFIL_HXX +#define _SVX_MULTIFIL_HXX + +// include --------------------------------------------------------------- + +#include "multipat.hxx" + +// #97807# ---------------------------------------------------- +#include <ucbhelper/content.hxx> +#include <map> + +// class SvxMultiFileDialog ---------------------------------------------- + +class SvxMultiFileDialog : public SvxMultiPathDialog +{ +private: + // #97807# ------------------------------------- + std::map< String, ::ucbhelper::Content > aFileContentMap; + + DECL_LINK( AddHdl_Impl, PushButton * ); + DECL_LINK( DelHdl_Impl, PushButton * ); + +public: + SvxMultiFileDialog( Window* pParent, BOOL bEmptyAllowed = FALSE ); + ~SvxMultiFileDialog(); + + String GetFiles() const { return SvxMultiPathDialog::GetPath(); } + void SetFiles( const String& rPath ) { SvxMultiPathDialog::SetPath(rPath); aDelBtn.Enable(); } +}; + + +#endif + diff --git a/cui/source/inc/multipat.hxx b/cui/source/inc/multipat.hxx new file mode 100644 index 000000000000..44e8f15435fc --- /dev/null +++ b/cui/source/inc/multipat.hxx @@ -0,0 +1,89 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_MULTIPAT_HXX +#define _SVX_MULTIPAT_HXX + +// include --------------------------------------------------------------- + +#include <vcl/dialog.hxx> +#include <vcl/lstbox.hxx> +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +#include <vcl/fixed.hxx> + +#include "radiobtnbox.hxx" + +// define ---------------------------------------------------------------- + +// different delimiter for Unix (:) and Windows (;) + +#ifdef UNX +#define CLASSPATH_DELIMITER ':' +#else +#define CLASSPATH_DELIMITER ';' +#endif + +// forward --------------------------------------------------------------- + +struct MultiPath_Impl; + +// class SvxMultiPathDialog ---------------------------------------------- + +class SvxMultiPathDialog : public ModalDialog +{ +protected: + FixedLine aPathFL; + ListBox aPathLB; + svx::SvxRadioButtonListBox aRadioLB; + FixedText aRadioFT; + PushButton aAddBtn; + PushButton aDelBtn; + OKButton aOKBtn; + CancelButton aCancelBtn; + HelpButton aHelpButton; + + MultiPath_Impl* pImpl; + + DECL_LINK( AddHdl_Impl, PushButton * ); + DECL_LINK( DelHdl_Impl, PushButton * ); + DECL_LINK( SelectHdl_Impl, void * ); + DECL_LINK( CheckHdl_Impl, svx::SvxRadioButtonListBox * ); + +public: + SvxMultiPathDialog( Window* pParent, BOOL bEmptyAllowed = FALSE ); + ~SvxMultiPathDialog(); + + String GetPath() const; + void SetPath( const String& rPath ); + void SetClassPathMode(); + sal_Bool IsClassPathMode() const; + void EnableRadioButtonMode(); +}; + +#endif // #ifndef _SVX_MULTIPAT_HXX + diff --git a/cui/source/inc/newtabledlg.hxx b/cui/source/inc/newtabledlg.hxx new file mode 100644 index 000000000000..b997ddab1efc --- /dev/null +++ b/cui/source/inc/newtabledlg.hxx @@ -0,0 +1,62 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_NEWTABLEDLG_HXX +#define _SVX_NEWTABLEDLG_HXX + +#include <vcl/fixed.hxx> +#include <vcl/field.hxx> +#include <vcl/button.hxx> + +#include <svx/stddlg.hxx> +#include <svx/svxdlg.hxx> + +class SvxNewTableDialog : public SvxAbstractNewTableDialog, public ModalDialog +{ +private: + FixedText maFtColumns; + NumericField maNumColumns; + FixedText maFtRows; + NumericField maNumRows; + + FixedLine maFlSep; + HelpButton maHelpButton; + OKButton maOkButton; + CancelButton maCancelButton; + +public: + SvxNewTableDialog( Window* pWindow ); + + virtual short Execute(void); + virtual void Apply(void); + + virtual sal_Int32 getRows() const; + virtual sal_Int32 getColumns() const; +}; + +#endif // _SVX_NEWTABLEDLG_HXX + + diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx new file mode 100644 index 000000000000..92cc494faac4 --- /dev/null +++ b/cui/source/inc/numfmt.hxx @@ -0,0 +1,188 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_NUMFMT_HXX +#define _SVX_NUMFMT_HXX + +//------------------------------------------------------------------------ + +#include <vcl/window.hxx> +#include <tools/color.hxx> +#include <tools/string.hxx> +#include <sfx2/tabdlg.hxx> +#include <vcl/fixed.hxx> +#include <vcl/lstbox.hxx> +#include <vcl/edit.hxx> +#include <vcl/toolbox.hxx> +#include <vcl/field.hxx> +#include <svx/langbox.hxx> +#include <svx/fontlb.hxx> + +//CHINA001 #define SVX_NUMVAL_STANDARD -1234.12345678901234 +//CHINA001 #define SVX_NUMVAL_CURRENCY -1234 +//CHINA001 #define SVX_NUMVAL_PERCENT -0.1295 +//CHINA001 #define SVX_NUMVAL_TIME 36525.5678935185 +//CHINA001 #define SVX_NUMVAL_DATE 36525.5678935185 +//CHINA001 #define SVX_NUMVAL_BOOLEAN 1 + +//------------------------------------------------------------------------ + +class SvxNumberFormatShell; +class SvxNumberInfoItem; + +//------------------------------------------------------------------------ + +class SvxNumberPreviewImpl : public Window +{ +private: + String aPrevStr; + Color aPrevCol; + + void InitSettings( BOOL bForeground, BOOL bBackground ); + +protected: + virtual void Paint( const Rectangle& rRect ); + virtual void StateChanged( StateChangedType nStateChange ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + +public: + SvxNumberPreviewImpl( Window* pParent, const ResId& rResId ); + ~SvxNumberPreviewImpl(); + + void NotifyChange( const String& rPrevStr, const Color* pColor = NULL ); +}; + +// ----------------------------------------------------------------------- + +#include <sfx2/layout.hxx> +#include <layout/layout-pre.hxx> + +class SvxNumberFormatTabPage : public SfxTabPage +{ + using SfxTabPage::DeactivatePage; + +public: + ~SvxNumberFormatTabPage(); + +#undef SfxTabPage +#define SfxTabPage ::SfxTabPage + static SfxTabPage* Create( Window* pParent, + const SfxItemSet& rAttrSet ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + virtual int DeactivatePage ( SfxItemSet* pSet = NULL ); + + void SetInfoItem( const SvxNumberInfoItem& rItem ); + void SetNumberFormatList( const SvxNumberInfoItem& rItem ) + { SetInfoItem( rItem ); } + + void SetOkHdl( const Link& rOkHandler ); + void HideLanguage(BOOL nFlag=TRUE); + virtual long PreNotify( NotifyEvent& rNEvt ); + virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001 +private: + SvxNumberFormatTabPage( Window* pParent, + const SfxItemSet& rCoreAttrs ); + FixedText aFtCategory; + ListBox aLbCategory; + FixedText aFtFormat; + ListBox aLbCurrency; + SvxFontListBox aLbFormat; + FixedText aFtLanguage; + SvxLanguageBox aLbLanguage; + CheckBox aCbSourceFormat; + + FixedText aFtDecimals; + NumericField aEdDecimals; + FixedText aFtLeadZeroes; + NumericField aEdLeadZeroes; + CheckBox aBtnNegRed; + CheckBox aBtnThousand; + FixedLine aFlOptions; + + FixedText aFtEdFormat; + Edit aEdFormat; + ImageButton aIbAdd; + ImageButton aIbInfo; + ImageButton aIbRemove; + + FixedText aFtComment; + Edit aEdComment; + Timer aResetWinTimer; + + SvxNumberPreviewImpl aWndPreview; + + SvxNumberInfoItem* pNumItem; + SvxNumberFormatShell* pNumFmtShell; + ULONG nInitFormat; + Link fnOkHdl; + + BOOL bNumItemFlag; //Fuer Handling mit DocShell + BOOL bOneAreaFlag; + short nFixedCategory; + + long nCatHeight; + + long nCurFormatY; + long nCurFormatHeight; + long nStdFormatY; + long nStdFormatHeight; + LocalizedString sAutomaticEntry; + + Window* pLastActivWindow; + +#ifdef _SVX_NUMFMT_CXX + void Init_Impl(); + void FillCurrencyBox(); + void FillFormatListBox_Impl( SvxDelStrgs& rEntries ); + void UpdateOptions_Impl( BOOL bCheckCatChange ); + void UpdateFormatListBox_Impl( USHORT bCat, BOOL bUpdateEdit ); + void DeleteEntryList_Impl( SvxDelStrgs& rEntries ); + void Obstructing(); + void EnableBySourceFormat_Impl(); + void SetCategory( USHORT nPos ); + String GetExpColorString( Color*& rpPreviewColor, const String& aFormatStr, short nTmpCatPos ); + void MakePreviewText( const String& rFormat ); + void ChangePreviewText( USHORT nPos ); + void AddAutomaticLanguage_Impl(LanguageType eAutoLang, BOOL bSelect); + // Handler + DECL_LINK( LostFocusHdl_Impl, Edit* pEd ); + DECL_LINK( DoubleClickHdl_Impl, SvxFontListBox* pLb ); + DECL_LINK( SelFormatHdl_Impl, void * ); + DECL_LINK( ClickHdl_Impl, ImageButton* pIB ); + DECL_LINK( EditHdl_Impl, Edit* pEdFormat ); + DECL_LINK( OptHdl_Impl, void * ); + DECL_LINK( TimeHdl_Impl, Timer * ); + +#endif +}; + +#include <layout/layout-post.hxx> + +#endif + diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx new file mode 100644 index 000000000000..47decd0ad9c7 --- /dev/null +++ b/cui/source/inc/numpages.hxx @@ -0,0 +1,469 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_NUMPAGES_HXX +#define _SVX_NUMPAGES_HXX + +// include --------------------------------------------------------------- + +#include <sfx2/tabdlg.hxx> +#include <vcl/group.hxx> +#include <vcl/fixed.hxx> +#include <vcl/menubtn.hxx> +#include <vcl/lstbox.hxx> +#include <vcl/edit.hxx> +#include <vcl/field.hxx> +#ifndef _SVX_NUMDEF_HXX +#include <editeng/numdef.hxx> +#endif +#include <svtools/ctrlbox.hxx> +#include <svl/svarray.hxx> + +// ----------------------------------------------------------------------- +class SvxNumRule; +class SvxBmpNumValueSet; +class SvxNumValueSet; +class ValueSet; +class SvxNumberingPreview; +class SvxBrushItem; + +/*-----------------13.02.97 14.02------------------- + +--------------------------------------------------*/ + +struct SvxNumSettings_Impl +{ + short nNumberType; + short nParentNumbering; + rtl::OUString sPrefix; + rtl::OUString sSuffix; + rtl::OUString sBulletChar; + rtl::OUString sBulletFont; + SvxNumSettings_Impl() : + nNumberType(0), + nParentNumbering(0) + {} +}; + +typedef SvxNumSettings_Impl* SvxNumSettings_ImplPtr; +SV_DECL_PTRARR_DEL(SvxNumSettingsArr_Impl,SvxNumSettings_ImplPtr,8,4) + +/*-----------------07.02.97 11.36------------------- + +--------------------------------------------------*/ +class SvxSingleNumPickTabPage : public SfxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + + FixedLine aValuesFL; + SvxNumValueSet* pExamplesVS; + SvxNumSettingsArr_Impl aNumSettingsArr; + SvxNumRule* pActNum; + SvxNumRule* pSaveNum; + USHORT nActNumLvl; + BOOL bModified : 1; + BOOL bPreset : 1; + + String sNumCharFmtName; + USHORT nNumItemId; + + protected: + DECL_LINK( NumSelectHdl_Impl, ValueSet*); + DECL_LINK( DoubleClickHdl_Impl, ValueSet* ); + + public: + SvxSingleNumPickTabPage(Window* pParent, + const SfxItemSet& rSet); + ~SvxSingleNumPickTabPage(); + + static SfxTabPage* Create( Window* pParent, + const SfxItemSet& rAttrSet); + + virtual void ActivatePage(const SfxItemSet& rSet); + virtual int DeactivatePage(SfxItemSet *pSet); + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + + void SetNumCharFmtName(const String& rName){sNumCharFmtName = rName;} +}; + +/*-----------------07.02.97 11.36------------------- + +--------------------------------------------------*/ + +class SvxBulletPickTabPage : public SfxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + + FixedLine aValuesFL; + SvxNumValueSet* pExamplesVS; + SvxNumRule* pActNum; + SvxNumRule* pSaveNum; + USHORT nActNumLvl; + BOOL bModified : 1; + BOOL bPreset : 1; + USHORT nNumItemId; + + String sBulletCharFmtName; + protected: + DECL_LINK(NumSelectHdl_Impl, ValueSet*); + DECL_LINK( DoubleClickHdl_Impl, ValueSet* ); + public: + SvxBulletPickTabPage(Window* pParent, + const SfxItemSet& rSet); + ~SvxBulletPickTabPage(); + + static SfxTabPage* Create( Window* pParent, + const SfxItemSet& rAttrSet); + + virtual void ActivatePage(const SfxItemSet& rSet); + virtual int DeactivatePage(SfxItemSet *pSet); + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + + void SetCharFmtName(const String& rName){sBulletCharFmtName = rName;} + virtual void PageCreated(SfxAllItemSet aSet); // add CHINA001 +}; + +/*-----------------07.02.97 11.36------------------- + TabPage fuer vollstaendig Numerierung +--------------------------------------------------*/ +#define NUMTYPE_MEMBER 4 // Anzahl der Elemente des FormatStrings je Ebene +#define NUM_VALUSET_COUNT 16 +class SvxNumPickTabPage : public SfxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + + FixedLine aValuesFL; + SvxNumValueSet* pExamplesVS; + String sNumCharFmtName; + String sBulletCharFmtName; + + SvxNumSettingsArr_Impl aNumSettingsArrays[NUM_VALUSET_COUNT]; // wird mit den fuenf Formaten initialisiert + + SvxNumRule* pActNum; + SvxNumRule* pSaveNum; + USHORT nActNumLvl; + USHORT nNumItemId; + BOOL bModified : 1; + BOOL bPreset : 1; + + + protected: + DECL_LINK(NumSelectHdl_Impl, ValueSet*); + DECL_LINK( DoubleClickHdl_Impl, ValueSet* ); + + public: + SvxNumPickTabPage(Window* pParent, + const SfxItemSet& rSet); + ~SvxNumPickTabPage(); + + static SfxTabPage* Create( Window* pParent, + const SfxItemSet& rAttrSet); + + virtual void ActivatePage(const SfxItemSet& rSet); + virtual int DeactivatePage(SfxItemSet *pSet); + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + + void SetCharFmtNames(const String& rCharName, const String& rBulName) + { sNumCharFmtName = rCharName; + sBulletCharFmtName = rBulName;} + virtual void PageCreated(SfxAllItemSet aSet); // add CHINA001 +}; + +/*-----------------12.02.97 07.42------------------- + +--------------------------------------------------*/ +class SvxBitmapPickTabPage : public SfxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + + FixedLine aValuesFL; + SvxBmpNumValueSet* pExamplesVS; + FixedText aErrorText; + CheckBox aLinkedCB; + + List aGrfNames; + String sNumCharFmtName; + + SvxNumRule* pActNum; + SvxNumRule* pSaveNum; + USHORT nActNumLvl; + USHORT nNumItemId; + SfxMapUnit eCoreUnit; + BOOL bModified : 1; + BOOL bPreset : 1; + + protected: + DECL_LINK( NumSelectHdl_Impl, ValueSet*); + DECL_LINK( DoubleClickHdl_Impl, ValueSet* ); + DECL_LINK( LinkBmpHdl_Impl, CheckBox* ); + + public: + SvxBitmapPickTabPage(Window* pParent, + const SfxItemSet& rSet); + ~SvxBitmapPickTabPage(); + + static SfxTabPage* Create( Window* pParent, + const SfxItemSet& rAttrSet); + + virtual void ActivatePage(const SfxItemSet& rSet); + virtual int DeactivatePage(SfxItemSet *pSet); + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + + void SetNumCharFmtName(const String& rName){sNumCharFmtName = rName;} +}; + +/*-----------------01.12.97 16:13------------------- + +--------------------------------------------------*/ +class SvxNumOptionsTabPage : public SfxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + + FixedLine aFormatFL; + FixedText aLevelFT; + MultiListBox aLevelLB; + + FixedText aFmtFT; + ListBox aFmtLB; + FixedText aPrefixFT; + Edit aPrefixED; + FixedText aSuffixFT; + Edit aSuffixED; + FixedText aCharFmtFT; + ListBox aCharFmtLB; + FixedText aBulColorFT; + ColorListBox aBulColLB; + FixedText aBulRelSizeFT; + MetricField aBulRelSizeMF; + FixedText aAllLevelFT; + NumericField aAllLevelNF; + FixedText aStartFT; + NumericField aStartED; + PushButton aBulletPB; + FixedText aAlignFT; + ListBox aAlignLB; + FixedText aBitmapFT; + MenuButton aBitmapMB; + FixedText aSizeFT; + MetricField aWidthMF; + FixedText aMultFT; + MetricField aHeightMF; + CheckBox aRatioCB; + FixedText aOrientFT; + ListBox aOrientLB; + + FixedLine aSameLevelFL; + CheckBox aSameLevelCB; + + String sNumCharFmtName; + String sBulletCharFmtName; + + Timer aInvalidateTimer; + + SvxNumberingPreview* pPreviewWIN; + + SvxNumRule* pActNum; + SvxNumRule* pSaveNum; + + Size aInitSize[SVX_MAX_NUM]; + + BOOL bLastWidthModified : 1; + BOOL bModified : 1; + BOOL bPreset : 1; + BOOL bAutomaticCharStyles: 1; + BOOL bHTMLMode : 1; + BOOL bMenuButtonInitialized : 1; + + List aGrfNames; + Font aActBulletFont; + String sBullet; + String sStartWith; + + BYTE nBullet; + USHORT nActNumLvl; + USHORT nNumItemId; + SfxMapUnit eCoreUnit; + + void InitControls(); + void SwitchNumberType( BYTE nType, BOOL bBmp = FALSE ); + void CheckForStartValue_Impl(sal_uInt16 nNumberingType); + + DECL_LINK( NumberTypeSelectHdl_Impl, ListBox * ); + DECL_LINK( LevelHdl_Impl, ListBox * ); + DECL_LINK( PopupActivateHdl_Impl, Menu * ); + DECL_LINK( GraphicHdl_Impl, MenuButton * ); + DECL_LINK( BulletHdl_Impl, Button * ); + DECL_LINK( SizeHdl_Impl, MetricField * ); + DECL_LINK( RatioHdl_Impl, CheckBox * ); + DECL_LINK( CharFmtHdl_Impl, ListBox * ); + DECL_LINK( EditModifyHdl_Impl, Edit * ); + DECL_LINK( AllLevelHdl_Impl, NumericField * ); + DECL_LINK( OrientHdl_Impl, ListBox * ); + DECL_LINK( SameLevelHdl_Impl, CheckBox * ); + DECL_LINK( BulColorHdl_Impl, ColorListBox* ); + DECL_LINK( BulRelSizeHdl_Impl, MetricField *); + DECL_LINK( PreviewInvalidateHdl_Impl, Timer* ); + + DECL_STATIC_LINK( SvxNumOptionsTabPage, GraphicArrivedHdl_Impl, SvxBrushItem* ); + + public: + SvxNumOptionsTabPage(Window* pParent, + const SfxItemSet& rSet); + ~SvxNumOptionsTabPage(); + + static SfxTabPage* Create( Window* pParent, + const SfxItemSet& rAttrSet); + + virtual void ActivatePage(const SfxItemSet& rSet); + virtual int DeactivatePage(SfxItemSet *pSet); + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + +//??? void SetWrtShell(SwWrtShell* pSh); + void SetCharFmts(const String& rNumName, const String& rBulletName ) + { + sNumCharFmtName = rNumName; + sBulletCharFmtName = rBulletName; + } + void SetMetric(FieldUnit eSet); + + ListBox& GetCharFmtListBox() {return aCharFmtLB;} + void SetModified(BOOL bRepaint = TRUE); + virtual void PageCreated(SfxAllItemSet aSet); // add CHINA001 +}; + +/*-----------------03.12.97 10:18------------------- + +--------------------------------------------------*/ +class SvxNumPositionTabPage : public SfxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + + FixedLine aPositionFL; + FixedText aLevelFT; + MultiListBox aLevelLB; + + // --> OD 2008-01-11 #newlistlevelattrs# + // former set of controls shown for numbering rules containing list level + // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION + FixedText aDistBorderFT; + MetricField aDistBorderMF; + CheckBox aRelativeCB; + FixedText aIndentFT; + MetricField aIndentMF; + FixedText aDistNumFT; + MetricField aDistNumMF; + FixedText aAlignFT; + ListBox aAlignLB; + // <-- + + // --> OD 2008-01-10 #newlistlevelattrs# + // new set of controls shown for numbering rules containing list level + // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_ALIGNMENT + FixedText aLabelFollowedByFT; + ListBox aLabelFollowedByLB; + FixedText aListtabFT; + MetricField aListtabMF; + FixedText aAlign2FT; + ListBox aAlign2LB; + FixedText aAlignedAtFT; + MetricField aAlignedAtMF; + FixedText aIndentAtFT; + MetricField aIndentAtMF; + // <-- + + PushButton aStandardPB; + +#if OSL_DEBUG_LEVEL > 1 + FixedText* pDebugFixedText; +#endif + SvxNumberingPreview* pPreviewWIN; + + SvxNumRule* pActNum; + SvxNumRule* pSaveNum; + + USHORT nActNumLvl; + USHORT nNumItemId; + SfxMapUnit eCoreUnit; + + BOOL bModified : 1; + BOOL bPreset : 1; + BOOL bInInintControl : 1; //Modify-Fehler umgehen, soll ab 391 behoben sein + // --> OD 2008-01-11 #newlistlevelattrs# + bool bLabelAlignmentPosAndSpaceModeActive; + // <-- + + void InitControls(); + + DECL_LINK( LevelHdl_Impl, ListBox * ); + DECL_LINK( EditModifyHdl_Impl, Edit*); + DECL_LINK( DistanceHdl_Impl, MetricField * ); + DECL_LINK( RelativeHdl_Impl, CheckBox * ); + DECL_LINK( StandardHdl_Impl, PushButton * ); + + // --> OD 2008-01-11 #newlistlevelattrs# + void InitPosAndSpaceMode(); + void ShowControlsDependingOnPosAndSpaceMode(); + + DECL_LINK( LabelFollowedByHdl_Impl, ListBox* ); + DECL_LINK( ListtabPosHdl_Impl, MetricField* ); + DECL_LINK( AlignAtHdl_Impl, MetricField* ); + DECL_LINK( IndentAtHdl_Impl, MetricField* ); + // <-- + +public: + SvxNumPositionTabPage(Window* pParent, + const SfxItemSet& rSet); + ~SvxNumPositionTabPage(); + + virtual void ActivatePage(const SfxItemSet& rSet); + virtual int DeactivatePage(SfxItemSet *pSet); + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + + static SfxTabPage* Create( Window* pParent, + const SfxItemSet& rAttrSet); + + void SetMetric(FieldUnit eSet); + void SetModified(BOOL bRepaint = TRUE); + virtual void PageCreated(SfxAllItemSet aSet); // add CHINA001 +}; + +#endif + + + + diff --git a/cui/source/inc/optasian.hxx b/cui/source/inc/optasian.hxx new file mode 100644 index 000000000000..3e13018398b5 --- /dev/null +++ b/cui/source/inc/optasian.hxx @@ -0,0 +1,81 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_OPTASIAN_HXX +#define _SVX_OPTASIAN_HXX + +#include <sfx2/tabdlg.hxx> +#include <vcl/group.hxx> +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +#include <vcl/fixed.hxx> +#include <vcl/lstbox.hxx> +#include <vcl/edit.hxx> +#include <svx/langbox.hxx> +struct SvxAsianLayoutPage_Impl; +class SvxAsianLayoutPage : public SfxTabPage +{ + FixedLine aKerningGB; + RadioButton aCharKerningRB; + RadioButton aCharPunctKerningRB; + + FixedLine aCharDistGB; + RadioButton aNoCompressionRB; + RadioButton aPunctCompressionRB; + RadioButton aPunctKanaCompressionRB; + + FixedLine aStartEndGB; + + FixedText aLanguageFT; + SvxLanguageBox aLanguageLB; + CheckBox aStandardCB; + + FixedText aStartFT; + Edit aStartED; + FixedText aEndFT; + Edit aEndED; + FixedText aHintFT; + + SvxAsianLayoutPage_Impl* pImpl; + + DECL_LINK(LanguageHdl, SvxLanguageBox*); + DECL_LINK(ChangeStandardHdl, CheckBox*); + DECL_LINK(ModifyHdl, Edit*); + + SvxAsianLayoutPage( Window* pParent, const SfxItemSet& rSet ); +public: + + virtual ~SvxAsianLayoutPage(); + + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); + static UINT16* GetRanges(); + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); +}; + +#endif + diff --git a/cui/source/inc/optdict.hxx b/cui/source/inc/optdict.hxx new file mode 100644 index 000000000000..345623c19cff --- /dev/null +++ b/cui/source/inc/optdict.hxx @@ -0,0 +1,188 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_OPTDICT_HXX +#define _SVX_OPTDICT_HXX + +// include --------------------------------------------------------------- + +#include <vcl/dialog.hxx> +#include <vcl/fixed.hxx> +#include <vcl/lstbox.hxx> +#ifndef _SV_BUTTON_HXX //autogen +#include <vcl/button.hxx> +#endif +#include <vcl/group.hxx> +#include <vcl/combobox.hxx> +#include <vcl/timer.hxx> +#include <vcl/edit.hxx> +#include <vcl/decoview.hxx> +#include <com/sun/star/util/Language.hpp> +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/uno/Sequence.hxx> + + +#include <svx/simptabl.hxx> +#include <svx/langbox.hxx> + +namespace com{namespace sun{namespace star{ +namespace linguistic2{ + class XDictionary; + class XSpellChecker1; + class XSpellChecker; +}}}} + +// forward --------------------------------------------------------------- + + +// class SvxNewDictionaryDialog ------------------------------------------ + +class SvxNewDictionaryDialog : public ModalDialog +{ +private: + FixedText aNameText; + Edit aNameEdit; + FixedText aLanguageText; + SvxLanguageBox aLanguageLB; + CheckBox aExceptBtn; + FixedLine aNewDictBox; + OKButton aOKBtn; + CancelButton aCancelBtn; + HelpButton aHelpBtn; + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > xSpell; + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionary > xNewDic; + +#ifdef _SVX_OPTDICT_CXX + DECL_LINK( OKHdl_Impl, Button * ); + DECL_LINK( ModifyHdl_Impl, Edit * ); +#endif + +public: + SvxNewDictionaryDialog( Window* pParent, + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > &xSpl ); + + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionary > + GetNewDictionary() { return xNewDic; } +}; + +// class SvxDictEdit ---------------------------------------------------- + +class SvxDictEdit : public Edit +{ + Link aActionLink; + sal_Bool bSpaces; + + public: + SvxDictEdit(Window* pParent, const ResId& rResId) : + Edit(pParent, rResId), bSpaces(sal_False){} + + void SetActionHdl( const Link& rLink ) + { aActionLink = rLink;} + + void SetSpaces(sal_Bool bSet) + {bSpaces = bSet;} + + virtual void KeyInput( const KeyEvent& rKEvent ); +}; + +// class SvxEditDictionaryDialog ----------------------------------------- + +class SvxEditDictionaryDialog : public ModalDialog +{ +private: + + FixedText aBookFT; + ListBox aAllDictsLB; + FixedText aLangFT; + SvxLanguageBox aLangLB; + + FixedText aWordFT; + SvxDictEdit aWordED; + FixedText aReplaceFT; + SvxDictEdit aReplaceED; + SvTabListBox aWordsLB; + PushButton aNewReplacePB; + PushButton aDeletePB; + FixedLine aEditDictsBox; + + CancelButton aCloseBtn; + HelpButton aHelpBtn; + String sModify; + String sNew; + DecorationView aDecoView; + + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionary > > aDics; //! snapshot copy to work on + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > xSpell; + + short nOld; + long nWidth; + sal_Bool bFirstSelect; + sal_Bool bDoNothing; + BOOL bDicIsReadonly; + +#ifdef _SVX_OPTDICT_CXX + DECL_LINK( SelectBookHdl_Impl, ListBox * ); + DECL_LINK( SelectLangHdl_Impl, ListBox * ); + DECL_LINK(SelectHdl, SvTabListBox*); + DECL_LINK(NewDelHdl, PushButton*); + DECL_LINK(ModifyHdl, Edit*); + + + void ShowWords_Impl( sal_uInt16 nId ); + void SetLanguage_Impl( ::com::sun::star::util::Language nLanguage ); + sal_Bool IsDicReadonly_Impl() const { return bDicIsReadonly; } + void SetDicReadonly_Impl( ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionary > &xDic ); + + void RemoveDictEntry(SvLBoxEntry* pEntry); + USHORT GetLBInsertPos(const String &rDicWord); + +#endif + +protected: + + virtual void Paint( const Rectangle& rRect ); + +public: + SvxEditDictionaryDialog( Window* pParent, + const String& rName, + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1> &xSpl ); + ~SvxEditDictionaryDialog(); + + sal_uInt16 GetSelectedDict() {return aAllDictsLB.GetSelectEntryPos();} +}; + + +#endif + diff --git a/cui/source/inc/optimprove.hxx b/cui/source/inc/optimprove.hxx new file mode 100644 index 000000000000..266c51944b09 --- /dev/null +++ b/cui/source/inc/optimprove.hxx @@ -0,0 +1,118 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_OPTIMPROVE_HXX +#define _SVX_OPTIMPROVE_HXX + +// include --------------------------------------------------------------- + +#include <vcl/tabpage.hxx> +#include <vcl/fixed.hxx> +#include <vcl/button.hxx> +#include <svtools/fixedhyper.hxx> +#include <sfx2/basedlgs.hxx> +#include <sfx2/tabdlg.hxx> + +// class SvxImprovementPage ---------------------------------------------- + +class SvxImprovementPage : public TabPage +{ +private: + FixedLine m_aImproveFL; + FixedText m_aInvitationFT; + RadioButton m_aYesRB; + RadioButton m_aNoRB; + FixedLine m_aDataFL; + FixedText m_aNumberOfReportsFT; + FixedText m_aNumberOfReportsValueFT; + FixedText m_aNumberOfActionsFT; + FixedText m_aNumberOfActionsValueFT; + PushButton m_aShowDataPB; + + String m_sInfo; + String m_sMoreInfo; + +public: + SvxImprovementPage( Window* pParent ); + ~SvxImprovementPage(); + + inline bool IsYesChecked() const { return m_aYesRB.IsChecked() != FALSE; } + + inline String GetPageText() const { return GetText(); } + inline String GetInvitationText() const { return m_aInvitationFT.GetText(); } + inline String GetYesButtonText() const { return m_aYesRB.GetText(); } + inline String GetNoButtonText() const { return m_aNoRB.GetText(); } + inline String GetInfoText() const { return m_sInfo; } + inline String GetTitleText() const { return m_aImproveFL.GetText(); } +}; + +class SvxImprovementOptionsPage : public SfxTabPage +{ +private: + FixedLine m_aImproveFL; + FixedText m_aInvitationFT; + RadioButton m_aYesRB; + RadioButton m_aNoRB; + svt::FixedHyperlinkImage m_aInfoFI; + FixedLine m_aDataFL; + FixedText m_aNumberOfReportsFT; + FixedText m_aNumberOfReportsValueFT; + FixedText m_aNumberOfActionsFT; + FixedText m_aNumberOfActionsValueFT; + PushButton m_aShowDataPB; + + String m_sInfo; + String m_sMoreInfo; + ::rtl::OUString m_sLogPath; + + SvxImprovementOptionsPage( Window* pParent, const SfxItemSet& rSet ); + + DECL_LINK( HandleHyperlink, svt::FixedHyperlinkImage * ); + DECL_LINK( HandleShowData, PushButton * ); + +public: + virtual ~SvxImprovementOptionsPage(); + + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); + + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); +}; + +class SvxImprovementDialog : public SfxSingleTabDialog +{ +private: + SvxImprovementPage* m_pPage; + + DECL_LINK( HandleOK, OKButton * ); + DECL_LINK( HandleHyperlink, svt::FixedHyperlinkImage * ); + +public: + SvxImprovementDialog( Window* pParent, const String& rInfoURL ); +}; + +#endif + diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx new file mode 100644 index 000000000000..9220ed9bcfbc --- /dev/null +++ b/cui/source/inc/optlingu.hxx @@ -0,0 +1,181 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_OPTLINGU_HXX +#define _SVX_OPTLINGU_HXX + +// include --------------------------------------------------------------- + +#include <vcl/group.hxx> +#include <vcl/fixed.hxx> +#include <vcl/toolbox.hxx> +#include <vcl/field.hxx> +#include <svtools/fixedhyper.hxx> +#include <sfx2/tabdlg.hxx> +#include <svx/checklbx.hxx> +#include <svx/langbox.hxx> +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/uno/Sequence.hxx> +#include <com/sun/star/beans/XPropertySet.hpp> + +namespace com{namespace sun{namespace star{ +namespace beans{ + class XPropertySet; +} +namespace linguistic2{ + class XDictionary; + class XDictionaryList; + class XSpellChecker; +}}}} + +class SvLBoxEntry; +class SvxLinguData_Impl; + +// define ---------------------------------------------------------------- + +#define GROUP_MODULES ((sal_uInt16)0x0008) + +// forward --------------------------------------------------------------- + +class SvxEditModulesDlg : public ModalDialog +{ + FixedLine aModulesFL; + FixedText aLanguageFT; + SvxLanguageBox aLanguageLB; + + SvxCheckListBox aModulesCLB; + PushButton aPrioUpPB; + PushButton aPrioDownPB; + PushButton aBackPB; + svt::FixedHyperlink aMoreDictsLink; + + FixedLine aButtonsFL; + HelpButton aHelpPB; + OKButton aClosePB; + + String sSpell; + String sHyph; + String sThes; + String sGrammar; + + SvxLinguData_Impl* pDefaultLinguData; + SvxLinguData_Impl& rLinguData; + + SvLBoxButtonData* pCheckButtonData; + + SvLBoxEntry* CreateEntry(String& rTxt, USHORT nCol); + +#ifdef _SVX_OPTLINGU_CXX + DECL_LINK( SelectHdl_Impl, SvxCheckListBox * ); + DECL_LINK( UpDownHdl_Impl, PushButton * ); + DECL_LINK( ClickHdl_Impl, PushButton * ); + DECL_LINK( BackHdl_Impl, PushButton * ); + DECL_LINK( SelectHdlLB_Impl, ListBox * ); + DECL_LINK( LangSelectHdl_Impl, ListBox* ); + DECL_LINK( BoxCheckButtonHdl_Impl, SvTreeListBox * ); + DECL_LINK( OpenURLHdl_Impl, svt::FixedHyperlink* ); +#endif + +public: + SvxEditModulesDlg(Window* pParent, SvxLinguData_Impl& rData); + virtual ~SvxEditModulesDlg(); +}; + +// class SvxLinguTabPage ------------------------------------------------- + +class SvxLinguTabPage : public SfxTabPage +{ +private: + FixedLine aLinguisticFL; + FixedText aLinguModulesFT; + SvxCheckListBox aLinguModulesCLB; + PushButton aLinguModulesEditPB; + FixedText aLinguDicsFT; + SvxCheckListBox aLinguDicsCLB; + PushButton aLinguDicsNewPB; + PushButton aLinguDicsEditPB; + PushButton aLinguDicsDelPB; + FixedText aLinguOptionsFT; + SvxCheckListBox aLinguOptionsCLB; + PushButton aLinguOptionsEditPB; + svt::FixedHyperlink aMoreDictsLink; + + String sCapitalWords; + String sWordsWithDigits; + String sCapitalization; + String sSpellSpecial; + String sSpellAuto; + String sGrammarAuto; + String sNumMinWordlen; + String sNumPreBreak; + String sNumPostBreak; + String sHyphAuto; + String sHyphSpecial; + + com::sun::star::uno::Reference< + com::sun::star::beans::XPropertySet > xProp; + + com::sun::star::uno::Reference< + com::sun::star::linguistic2::XDictionaryList > xDicList; + com::sun::star::uno::Sequence< + com::sun::star::uno::Reference< + com::sun::star::linguistic2::XDictionary > > aDics; + + SvLBoxButtonData* pCheckButtonData; + + SvxLinguData_Impl* pLinguData; + + SvxLinguTabPage( Window* pParent, const SfxItemSet& rCoreSet ); + SvLBoxEntry* CreateEntry(String& rTxt, USHORT nCol); + + 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 * ); + DECL_LINK( ClickHdl_Impl, PushButton * ); + DECL_LINK( BoxDoubleClickHdl_Impl, SvTreeListBox * ); + DECL_LINK( BoxCheckButtonHdl_Impl, SvTreeListBox * ); + DECL_LINK( PostDblClickHdl_Impl, SvTreeListBox * ); + DECL_LINK( OpenURLHdl_Impl, svt::FixedHyperlink* ); + + void UpdateModulesBox_Impl(); + void UpdateDicBox_Impl(); +#endif + +public: + virtual ~SvxLinguTabPage(); + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); + static sal_uInt16* GetRanges(); + + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + + void HideGroups( sal_uInt16 nGrp ); +}; + +#endif + diff --git a/cui/source/inc/optpath.hxx b/cui/source/inc/optpath.hxx new file mode 100644 index 000000000000..2ac80aa64094 --- /dev/null +++ b/cui/source/inc/optpath.hxx @@ -0,0 +1,116 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_OPTPATH_HXX +#define _SVX_OPTPATH_HXX + +// include --------------------------------------------------------------- + +#include <sfx2/tabdlg.hxx> +#ifndef _FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif +#ifndef _GROUP_HXX //autogen +#include <vcl/group.hxx> +#endif + +#ifdef _SVX_OPTPATH_CXX +#include <svtools/headbar.hxx> +#else +class HeaderBar; +#endif +#include "ControlFocusHelper.hxx" + +#ifndef _COM_SUN_STAR_UI_XFOLDERPICKER_HPP_ +#include <com/sun/star/ui/dialogs/XFolderPicker.hpp> +#endif +#include <svtools/dialogclosedlistener.hxx> + +// forward --------------------------------------------------------------- + +class SvTabListBox; +namespace svx +{ + class OptHeaderTabListBox; +} +struct OptPath_Impl; +class SvxPathTabPage; + +// define ---------------------------------------------------------------- + +#define SfxPathTabPage SvxPathTabPage + +// class SvxPathTabPage -------------------------------------------------- + +class SvxPathTabPage : public SfxTabPage +{ +private: + FixedLine aStdBox; + FixedText aTypeText; + FixedText aPathText; + SvxControlFocusHelper aPathCtrl; + PushButton aStandardBtn; + PushButton aPathBtn; + + HeaderBar* pHeaderBar; + ::svx::OptHeaderTabListBox* pPathBox; + OptPath_Impl* pImpl; + + ::com::sun::star::uno::Reference< ::svt::DialogClosedListener > xDialogListener; + ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFolderPicker > xFolderPicker; + +#ifdef _SVX_OPTPATH_CXX + void ChangeCurrentEntry( const String& _rFolder ); + + DECL_LINK( PathHdl_Impl, PushButton * ); + DECL_LINK( StandardHdl_Impl, PushButton * ); + + DECL_LINK( PathSelect_Impl, svx::OptHeaderTabListBox * ); + DECL_LINK( HeaderSelect_Impl, HeaderBar * ); + DECL_LINK( HeaderEndDrag_Impl, HeaderBar * ); + + DECL_LINK( DialogClosedHdl, ::com::sun::star::ui::dialogs::DialogClosedEvent* ); + + void GetPathList( USHORT _nPathHandle, String& _rInternalPath, + String& _rUserPath, String& _rWritablePath, sal_Bool& _rReadOnly ); + void SetPathList( USHORT _nPathHandle, + const String& _rUserPath, const String& _rWritablePath ); +#endif + +public: + SvxPathTabPage( Window* pParent, const SfxItemSet& rSet ); + ~SvxPathTabPage(); + + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + virtual void FillUserData(); +}; + +#endif + diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx new file mode 100644 index 000000000000..9931d2d2cff1 --- /dev/null +++ b/cui/source/inc/page.hxx @@ -0,0 +1,238 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_PAGE_HXX +#define _SVX_PAGE_HXX + + +#include <sfx2/tabdlg.hxx> +#include <vcl/field.hxx> +#include <vcl/fixed.hxx> +#include <vcl/group.hxx> +#include <vcl/lstbox.hxx> +#include <svtools/stdctrl.hxx> +#include <svx/pagectrl.hxx> +#include <svx/frmdirlbox.hxx> +#include <editeng/svxenum.hxx> +#include <i18npool/paper.hxx> +#include <svx/flagsdef.hxx> + +// enum ------------------------------------------------------------------ + +//CHINA001 enum SvxModeType +//CHINA001 { +//CHINA001 SVX_PAGE_MODE_STANDARD, +//CHINA001 SVX_PAGE_MODE_CENTER, +//CHINA001 SVX_PAGE_MODE_PRESENTATION +//CHINA001 }; + +// class SvxPageDescPage ------------------------------------------------- + +/* {k:\svx\prototyp\dialog\page.bmp} + + [Beschreibung] + TabPage zur Einstellung einer Seite (Groesse, Raender, ...) + + [Items] + <SvxPageItem>: <SID_ATTR_PAGE> + <SvxSizeItem>: <SID_ATTR_SIZE> + <SvxSizeItem>: <SID_ATTR_MAXSIZE> + <SvxULSpaceItem>: <SID_ATTR_LRSPACE> + <SvxLRSpaceItem>: <SID_ATTR_ULSPACE> + <SfxAllEnumItem>: <SID_ATTR_PAPERTRAY> + <SvxPaperBinItem>: <SID_ATTR_PAPERBIN> + <SvxBoolItem>: <SID_ATTR_EXT1> + <SvxBoolItem>: <SID_ATTR_EXT2> + + <SfxSetItem>: <SID_ATTR_HEADERSET> + <SfxBoolItem>: <SID_ATTR_ON> + <SfxBoolItem>: <SID_ATTR_DYNAMIC> + <SfxBoolItem>: <SID_ATTR_SHARED> + <SvxSizeItem>: <SID_ATTR_SIZE> + <SvxULSpaceItem>: <SID_ATTR_ULSPACE> + <SvxLRSpaceItem>: <SID_ATTR_LRSPACE> + + <SfxSetItem>: <SID_ATTR_FOOTERSET> + <SfxBoolItem>: <SID_ATTR_ON> + <SfxBoolItem>: <SID_ATTR_DYNAMIC> + <SfxBoolItem>: <SID_ATTR_SHARED> + <SvxSizeItem>: <SID_ATTR_SIZE> + <SvxULSpaceItem>: <SID_ATTR_ULSPACE> + <SvxLRSpaceItem>: <SID_ATTR_LRSPACE> +*/ + +struct SvxPage_Impl; +typedef USHORT MarginPosition; + +class SvxPageDescPage : public SfxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + + // paper format + FixedLine aPaperSizeFl; + FixedText aPaperFormatText; + ListBox aPaperSizeBox; + + FixedText aPaperWidthText; + MetricField aPaperWidthEdit; + FixedText aPaperHeightText; + MetricField aPaperHeightEdit; + + FixedText aOrientationFT; + RadioButton aPortraitBtn; + RadioButton aLandscapeBtn; + + SvxPageWindow aBspWin; + + FixedText aTextFlowLbl; + svx::FrameDirectionListBox aTextFlowBox; + + FixedText aPaperTrayLbl; + ListBox aPaperTrayBox; + + // Margins + FixedLine aMarginFl; + FixedText aLeftMarginLbl; + MetricField aLeftMarginEdit; + FixedText aRightMarginLbl; + MetricField aRightMarginEdit; + FixedText aTopMarginLbl; + MetricField aTopMarginEdit; + FixedText aBottomMarginLbl; + MetricField aBottomMarginEdit; + + // layout settings + FixedLine aLayoutFL; + FixedText aPageText; + ListBox aLayoutBox; + FixedText aNumberFormatText; + ListBox aNumberFormatBox; + + FixedLine aBottomSeparatorFl; + + //Extras Calc + FixedText aTblAlignFT; + CheckBox aHorzBox; + CheckBox aVertBox; + + // Impress and Draw + CheckBox aAdaptBox; + + //Register Writer + CheckBox aRegisterCB; + FixedText aRegisterFT; + ListBox aRegisterLB; + + String sStandardRegister; + + String aInsideText; + String aOutsideText; + String aLeftText; + String aRightText; + String aPrintRangeQueryText; + + long nFirstLeftMargin; + long nFirstRightMargin; + long nFirstTopMargin; + long nFirstBottomMargin; + long nLastLeftMargin; + long nLastRightMargin; + long nLastTopMargin; + long nLastBottomMargin; + + Size aMaxSize; + BOOL bLandscape; + FASTBOOL bBorderModified; + SvxModeType eMode; + Paper ePaperStart; + Paper ePaperEnd; + + SvxPage_Impl* pImpl; + +#ifdef _SVX_PAGE_CXX + void Init_Impl(); + DECL_LINK( LayoutHdl_Impl, ListBox* ); + DECL_LINK( PaperBinHdl_Impl, ListBox* ); + DECL_LINK( SwapOrientation_Impl, RadioButton* ); + void SwapFirstValues_Impl( FASTBOOL bSet ); + DECL_LINK( BorderModify_Impl, MetricField* ); + void InitHeadFoot_Impl( const SfxItemSet& rSet ); + DECL_LINK( CenterHdl_Impl, CheckBox* ); + void UpdateExample_Impl( bool bResetbackground = false ); + + // Papiergroesse + DECL_LINK( PaperSizeSelect_Impl, ListBox* ); + DECL_LINK( PaperSizeModify_Impl, Edit* ); + + DECL_LINK( FrameDirectionModify_Impl, ListBox* ); + + // Hintergrund + void ResetBackground_Impl( const SfxItemSet& rSet ); + + // Grenzwerte + DECL_LINK( RangeHdl_Impl, Edit* ); + void CalcMargin_Impl(); + + // Registerhaltigkeit + DECL_LINK( RegisterModify, CheckBox * ); + + // page direction + /** Disables vertical page direction entries in the text flow listbox. */ + void DisableVerticalPageDir(); + + bool IsPrinterRangeOverflow( MetricField& rField, long nFirstMargin, + long nLastMargin, MarginPosition nPos ); + void CheckMarginEdits( bool _bClear ); + bool IsMarginOutOfRange(); +#endif + + SvxPageDescPage( Window* pParent, const SfxItemSet& rSet ); + +protected: + virtual void ActivatePage( const SfxItemSet& rSet ); + virtual int DeactivatePage( SfxItemSet* pSet = 0 ); + +public: + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& rOutSet ); + virtual void Reset( const SfxItemSet& rSet ); + virtual void FillUserData(); + + virtual ~SvxPageDescPage(); + + void SetMode( SvxModeType eMType ) { eMode = eMType; } + void SetPaperFormatRanges( Paper eStart, Paper eEnd ) + { ePaperStart = eStart, ePaperEnd = eEnd; } + + void SetCollectionList(const List* pList); + virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001 +}; + +#endif // #ifndef _SVX_PAGE_HXX + diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx new file mode 100644 index 000000000000..64a926f5ef89 --- /dev/null +++ b/cui/source/inc/paragrph.hxx @@ -0,0 +1,326 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_PARAGRPH_HXX +#define _SVX_PARAGRPH_HXX + +// include --------------------------------------------------------------- + +#include <vcl/button.hxx> +#include <vcl/fixed.hxx> +#include <sfx2/tabdlg.hxx> +#include <svx/relfld.hxx> // SvxRelativeField +#include <svx/paraprev.hxx> // Preview +#include <svx/frmdirlbox.hxx> +#include <vcl/lstbox.hxx> +#include <svx/flagsdef.hxx> + +// define ---------------------------------------------------------------- + +// 1/2 cm in TWIPS +// wird auch fuer Minimalgrosse der LayFrms aller Arten benutzt +//CHINA001 #define MM50 283 + +// forward --------------------------------------------------------------- + +class SvxLineSpacingItem; +class SvxParagraphControllerItem; + +// class SvxStdParagraphTabPage ------------------------------------------ + +/* {k:\svx\prototyp\dialog\parastd.bmp} + + [Beschreibung] + Mit dieser TabPage koennen Standard-Attribute eines Absatzes eingestellt + werden (Einzug, Abstand, Ausrichtung, Zeilenabstand). + + [Items] + <SvxAdjustItem><SID_ATTR_PARA_ADJUST> + <SvxLineSpacingItem><SID_ATTR_PARA_LINESPACE> + <SvxULSpaceItem><SID_ATTR_ULSPACE> + <SvxLRSpaceItem><SID_ATTR_LRSPACE> +*/ + +class SvxStdParagraphTabPage: public SfxTabPage +{ + using TabPage::DeactivatePage; + +private: + SvxStdParagraphTabPage( Window* pParent, const SfxItemSet& rSet ); + + // Einzug + FixedText aLeftLabel; + SvxRelativeField aLeftIndent; + + FixedText aRightLabel; + SvxRelativeField aRightIndent; + + FixedText aFLineLabel; + SvxRelativeField aFLineIndent; + CheckBox aAutoCB; + + FixedLine aIndentFrm; + + // Abstaende + FixedText aTopLabel; + SvxRelativeField aTopDist; + FixedText aBottomLabel; + SvxRelativeField aBottomDist; + FixedLine aDistFrm; + + // Zeilenabstand + ListBox aLineDist; + FixedText aLineDistAtLabel; + MetricField aLineDistAtPercentBox; + MetricField aLineDistAtMetricBox; + FixedLine aLineDistFrm; + String sAbsDist; + SvxParaPrevWindow aExampleWin; + + //Registerhaltigkeit - nur Writer + CheckBox aRegisterCB; + FixedLine aRegisterFL; + + Edit* pActLineDistFld; + long nAbst; + long nWidth; + long nMinFixDist; + BOOL bRelativeMode; + BOOL bNegativeIndents; + +#ifdef _SVX_PARAGRPH_CXX + void SetLineSpacing_Impl( const SvxLineSpacingItem& rAttr ); + void Init_Impl(); + void UpdateExample_Impl( BOOL bAll = FALSE ); + + DECL_LINK( LineDistHdl_Impl, ListBox* ); + DECL_LINK( ModifyHdl_Impl, SvxRelativeField* ); + DECL_LINK( AutoHdl_Impl, CheckBox* ); +#endif + +protected: + virtual int DeactivatePage( SfxItemSet* pSet = 0 ); + +public: + DECL_LINK( ELRLoseFocusHdl, Edit* ); + + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + + + void SetPageWidth( USHORT nPageWidth ); + void EnableRelativeMode(); + void EnableRegisterMode(); + void EnableAutoFirstLine(); + void EnableAbsLineDist(long nMinTwip); + void EnableNegativeMode(); + virtual void PageCreated(SfxAllItemSet aSet); // add CHINA001 +}; + +// class SvxParaAlignTabPage ------------------------------------------------ + +class SvxParaAlignTabPage : public SfxTabPage +{ + using TabPage::DeactivatePage; + + // Ausrichtung + FixedLine aAlignFrm; + RadioButton aLeft; + RadioButton aRight; + RadioButton aCenter; + RadioButton aJustify; + FixedText aLastLineFT; + ListBox aLastLineLB; + CheckBox aExpandCB; + + CheckBox aSnapToGridCB; + + //preview + SvxParaPrevWindow aExampleWin; + //vertical alignment + FixedLine aVertAlignFL; + + FixedText aVertAlignFT; + ListBox aVertAlignLB; + + FixedLine aPropertiesFL; + FixedText aTextDirectionFT; + svx::FrameDirectionListBox aTextDirectionLB; + +#ifdef _SVX_PARAGRPH_CXX + DECL_LINK( AlignHdl_Impl, RadioButton* ); + DECL_LINK( LastLineHdl_Impl, ListBox* ); + DECL_LINK( TextDirectionHdl_Impl, ListBox* ); + + void UpdateExample_Impl( BOOL bAll = FALSE ); +#endif + + SvxParaAlignTabPage( Window* pParent, const SfxItemSet& rSet ); + virtual ~SvxParaAlignTabPage(); + +protected: + virtual int DeactivatePage( SfxItemSet* pSet = 0 ); + +public: + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + + void EnableJustifyExt(); + virtual void PageCreated(SfxAllItemSet aSet); // add CHINA001 +}; + +// class SvxExtParagraphTabPage ------------------------------------------ + +/* {k:\svx\prototyp\dialog\paraext.bmp} + + [Beschreibung] + Mit dieser TabPage koennen Spezial-Attribute eines Absatzes eingestellt + werden (Silbentrennung, Seitenumbruch, Schusterjungen, Hurenkinder, ...). + + [Items] + <SvxHyphenZoneItem><SID_ATTR_PARA_HYPHENZONE> + <SvxFmtBreakItem><SID_ATTR_PARA_PAGEBREAK> + <SvxFmtSplitItem><SID_ATTR_PARA_SPLIT> + <SvxWidowsItem><SID_ATTR_PARA_WIDOWS> + <SvxOrphansItem><SID_ATTR_PARA_ORPHANS> +*/ + +class SvxExtParagraphTabPage: public SfxTabPage +{ + using TabPage::DeactivatePage; + +public: + virtual ~SvxExtParagraphTabPage(); + + static SfxTabPage* Create( Window* pParent, + const SfxItemSet& rSet ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + + void DisablePageBreak(); + +protected: + virtual int DeactivatePage( SfxItemSet* pSet = 0 ); + +private: + SvxExtParagraphTabPage( Window* pParent, const SfxItemSet& rSet ); + + // Silbentrennung + TriStateBox aHyphenBox; + FixedText aBeforeText; + NumericField aExtHyphenBeforeBox; +// FixedText aHyphenBeforeLabel; + FixedText aAfterText; + NumericField aExtHyphenAfterBox; +// FixedText aHyphenAfterLabel; + FixedText aMaxHyphenLabel; + NumericField aMaxHyphenEdit; + FixedLine aExtFL; + + // Seitenumbruch + FixedLine aBreaksFL; + TriStateBox aPageBreakBox; + FixedText aBreakTypeFT; + ListBox aBreakTypeLB; + FixedText aBreakPositionFT; + ListBox aBreakPositionLB; + TriStateBox aApplyCollBtn; + ListBox aApplyCollBox; + FixedText aPagenumText; + NumericField aPagenumEdit; + + FixedLine aExtendFL; + + // Absatzteilung + TriStateBox aKeepTogetherBox; + TriStateBox aKeepParaBox; + + // Witwen/Waisen + TriStateBox aOrphanBox; + NumericField aOrphanRowNo; + FixedText aOrphanRowLabel; + + TriStateBox aWidowBox; + NumericField aWidowRowNo; + FixedText aWidowRowLabel; + + BOOL bPageBreak; + BOOL bHtmlMode; + USHORT nStdPos; + +#ifdef _SVX_PARAGRPH_CXX + DECL_LINK( PageBreakHdl_Impl, TriStateBox* ); + DECL_LINK( KeepTogetherHdl_Impl, TriStateBox* ); + DECL_LINK( WidowHdl_Impl, TriStateBox* ); + DECL_LINK( OrphanHdl_Impl, TriStateBox* ); + DECL_LINK( HyphenClickHdl_Impl, TriStateBox* ); + DECL_LINK( ApplyCollClickHdl_Impl, TriStateBox* ); + DECL_LINK( PageBreakPosHdl_Impl, ListBox* ); + DECL_LINK( PageBreakTypeHdl_Impl, ListBox* ); +#endif + virtual void PageCreated(SfxAllItemSet aSet); // add CHINA001 +}; +/* -----------------------------29.11.00 11:33-------------------------------- + + ---------------------------------------------------------------------------*/ +class SvxAsianTabPage : public SfxTabPage +{ + FixedLine aOptionsFL; + + TriStateBox aForbiddenRulesCB; + TriStateBox aHangingPunctCB; + + TriStateBox aScriptSpaceCB; + + SvxAsianTabPage( Window* pParent, const SfxItemSet& rSet ); + +#ifdef _SVX_PARAGRPH_CXX + DECL_LINK( ClickHdl_Impl, TriStateBox* ); +#endif +public: + ~SvxAsianTabPage(); + + + static SfxTabPage* Create( Window* pParent, + const SfxItemSet& rSet ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + +}; + +#endif // #ifndef _SVX_PARAGRPH_HXX + + diff --git a/cui/source/inc/passwdomdlg.hxx b/cui/source/inc/passwdomdlg.hxx new file mode 100755 index 000000000000..337c9b84da11 --- /dev/null +++ b/cui/source/inc/passwdomdlg.hxx @@ -0,0 +1,62 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _CUI_PASSWDOMDLG_HXX_ +#define _CUI_PASSWDOMDLG_HXX_ + + +#include <sfx2/basedlgs.hxx> + +#include <memory> + +////////////////////////////////////////////////////////////////////// + +struct PasswordToOpenModifyDialog_Impl; + +class PasswordToOpenModifyDialog : public SfxModalDialog +{ + std::auto_ptr< PasswordToOpenModifyDialog_Impl > m_pImpl; + + // disallow use of copy c-tor and assignment operator + PasswordToOpenModifyDialog( const PasswordToOpenModifyDialog & ); + PasswordToOpenModifyDialog & operator = ( const PasswordToOpenModifyDialog & ); + +public: + PasswordToOpenModifyDialog( Window * pParent, sal_uInt16 nMinPasswdLen, + sal_uInt16 nMaxPasswdLen /* 0 -> no max len enforced */, + bool bIsPasswordToModify ); + virtual ~PasswordToOpenModifyDialog(); + + // AbstractPasswordToOpenModifyDialog + virtual String GetPasswordToOpen() const; + virtual String GetPasswordToModify() const; + virtual bool IsRecommendToOpenReadonly() const; +}; + +////////////////////////////////////////////////////////////////////// + +#endif + diff --git a/cui/source/inc/pastedlg.hxx b/cui/source/inc/pastedlg.hxx new file mode 100644 index 000000000000..a1b71e2f751e --- /dev/null +++ b/cui/source/inc/pastedlg.hxx @@ -0,0 +1,95 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _PASTEDLG_HXX +#define _PASTEDLG_HXX + +#ifndef _TABLE_HXX //autogen +#include <tools/table.hxx> +#endif +#include <sot/formats.hxx> +#include <tools/globname.hxx> +#include <svtools/transfer.hxx> + +#include <vcl/dialog.hxx> +#include <vcl/fixed.hxx> +#include <vcl/button.hxx> +#include <vcl/edit.hxx> +#include <vcl/lstbox.hxx> + +/********************** SvPasteObjectDialog ****************************** +*************************************************************************/ + +struct TransferableObjectDescriptor; +class DataFlavorExVecor; +class TransferableDataHelper; + +class SvPasteObjectDialog : public ModalDialog +{ + FixedText aFtSource; + FixedText aFtObjectSource; + RadioButton aRbPaste; + RadioButton aRbPasteLink; + ListBox aLbInsertList; + CheckBox aCbDisplayAsIcon; + PushButton aPbChangeIcon; + FixedLine aFlChoice; + OKButton aOKButton1; + CancelButton aCancelButton1; + HelpButton aHelpButton1; + String aSObject; + Table aSupplementTable; + SvGlobalName aObjClassName; + String aObjName; + USHORT nAspect; + BOOL bLink; + + ListBox& ObjectLB() { return aLbInsertList; } + FixedText& ObjectSource() { return aFtObjectSource; } + RadioButton& PasteLink() { return aRbPasteLink; } + CheckBox& AsIconBox() { return aCbDisplayAsIcon; } + + const String& GetObjString() { return aSObject; } + void SelectObject(); + DECL_LINK( SelectHdl, ListBox * ); + DECL_LINK( DoubleClickHdl, ListBox * ); + void SetDefault(); + USHORT GetAspect() const { return nAspect; } + BOOL ShouldLink() const { return bLink; } + +public: + SvPasteObjectDialog( Window* pParent ); + ~SvPasteObjectDialog(); + + void Insert( SotFormatStringId nFormat, const String & rFormatName ); + void SetObjName( const SvGlobalName & rClass, const String & rObjName ); + ULONG GetFormat( const TransferableDataHelper& aHelper, + const DataFlavorExVector* pFormats=0, + const TransferableObjectDescriptor* pDesc=0 ); +}; + +#endif // _PASTEDLG_HXX diff --git a/cui/source/inc/postdlg.hxx b/cui/source/inc/postdlg.hxx new file mode 100644 index 000000000000..0a7b92438db4 --- /dev/null +++ b/cui/source/inc/postdlg.hxx @@ -0,0 +1,126 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_POSTDLG_HXX +#define _SVX_POSTDLG_HXX + +// include --------------------------------------------------------------- + +#ifndef _GROUP_HXX //autogen +#include <vcl/group.hxx> +#endif +#ifndef _IMAGEBTN_HXX //autogen +#include <vcl/imagebtn.hxx> +#endif +#ifndef _EDIT_HXX //autogen +#include <vcl/edit.hxx> +#endif +#include <svtools/stdctrl.hxx> +#include <sfx2/basedlgs.hxx> +#include <svtools/svmedit.hxx> + +// class SvxPostItDialog ------------------------------------------------- +/* + {k:\svx\prototyp\dialog\memo.bmp} + + [Beschreibung] + In diesem Dialog kann eine Notiz erstellt oder bearbeitet werden. Wenn die + Applikation eine Liste von Notizen haelt, kann mit Hilfe von Links, ueber + diese Liste iteriert werden. + + [Items] + <SvxPostitAuthorItem><SID_ATTR_POSTIT_AUTHOR> + <SvxPostitDateItem><SID_ATTR_POSTIT_DATE> + <SvxPostitTextItem><SID_ATTR_POSTIT_TEXT> +*/ + +class SvxPostItDialog : public SfxModalDialog +{ +public: + SvxPostItDialog( Window* pParent, const SfxItemSet& rCoreSet, + BOOL bPrevNext = FALSE, BOOL bRedline = FALSE ); + ~SvxPostItDialog(); + + static USHORT* GetRanges(); + const SfxItemSet* GetOutputItemSet() const { return pOutSet; } + + Link GetPrevHdl() const { return aPrevHdlLink; } + void SetPrevHdl( const Link& rLink ) + { aPrevHdlLink = rLink; } + Link GetNextHdl() const { return aNextHdlLink; } + void SetNextHdl( const Link& rLink ) + { aNextHdlLink = rLink; } + + void EnableTravel(BOOL bNext, BOOL bPrev); + inline String GetNote() { return aEditED.GetText(); } + inline void SetNote(const String& rTxt) { aEditED.SetText(rTxt); } + + void ShowLastAuthor(const String& rAuthor, const String& rDate); + inline void DontChangeAuthor() { aAuthorBtn.Enable(FALSE); } + inline void HideAuthor() { aAuthorBtn.Hide(); } + inline void SetReadonlyPostIt(BOOL bDisable) + { + aOKBtn.Enable( !bDisable ); + aEditED.SetReadOnly( bDisable ); + aAuthorBtn.Enable( !bDisable ); + } + inline BOOL IsOkEnabled() const { return aOKBtn.IsEnabled(); } + +private: + FixedLine aPostItFL; + FixedText aLastEditLabelFT; + FixedInfo aLastEditFT; + + FixedText aEditFT; + MultiLineEdit aEditED; + + FixedText aAuthorFT; + PushButton aAuthorBtn; + + OKButton aOKBtn; + CancelButton aCancelBtn; + HelpButton aHelpBtn; + + ImageButton aPrevBtn; + ImageButton aNextBtn; + + const SfxItemSet& rSet; + SfxItemSet* pOutSet; + + Link aPrevHdlLink; + Link aNextHdlLink; + +#ifdef _SVX_POSTDLG_CXX + DECL_LINK( Stamp, Button* ); + DECL_LINK( OKHdl, Button* ); + DECL_LINK( PrevHdl, Button* ); + DECL_LINK( NextHdl, Button* ); +#endif +}; + + +#endif + diff --git a/cui/source/inc/radiobtnbox.hxx b/cui/source/inc/radiobtnbox.hxx new file mode 100644 index 000000000000..0aadf6817d18 --- /dev/null +++ b/cui/source/inc/radiobtnbox.hxx @@ -0,0 +1,62 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_RADIOBTNBOX_HXX +#define _SVX_RADIOBTNBOX_HXX + +// include --------------------------------------------------------------- + +#include <svx/simptabl.hxx> + +namespace svx { + +// class SvxRadioButtonListBox ------------------------------------------- + +class SvxRadioButtonListBox : public SvxSimpleTable +{ + using SvxSimpleTable::SetTabs; + +private: + Point m_aCurMousePoint; + +protected: + virtual void SetTabs(); + virtual void MouseButtonUp( const MouseEvent& _rMEvt ); + virtual void KeyInput( const KeyEvent& rKEvt ); + +public: + SvxRadioButtonListBox( Window* _pParent, const ResId& _rId ); + ~SvxRadioButtonListBox(); + + void HandleEntryChecked( SvLBoxEntry* _pEntry ); + + const Point& GetCurMousePoint() const; +}; + +} // end of namespace ::svx + +#endif // #ifndef _SVX_RADIOBTNBOX_HXX + diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx new file mode 100644 index 000000000000..8ecdd93a5d2e --- /dev/null +++ b/cui/source/inc/scriptdlg.hxx @@ -0,0 +1,237 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SCRIPTDLG_HXX +#define _SCRIPTDLG_HXX + +#include <memory> + +#include "tools/solar.h" + +#include <svtools/svtreebx.hxx> +#include <vcl/dialog.hxx> +#include <vcl/button.hxx> +#include <vcl/fixed.hxx> +#include <vcl/abstdlg.hxx> +#include <sfx2/basedlgs.hxx> + +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/script/browse/XBrowseNode.hpp> +#include <com/sun/star/frame/XModel.hpp> + +#include <hash_map> + +#define OBJTYPE_BASICMANAGER 1L +//#define OBJTYPE_LIB 2L +//#define OBJTYPE_MODULE 3L +#define OBJTYPE_METHOD 2L +//#define OBJTYPE_METHODINOBJ 5L +//#define OBJTYPE_OBJECT 6L +//#define OBJTYPE_SUBOBJ 7L +//#define OBJTYPE_PROPERTY 8L +#define OBJTYPE_SCRIPTCONTAINER 3L +#define OBJTYPE_SFROOT 4L + +#define BROWSEMODE_MODULES 0x01 +#define BROWSEMODE_SUBS 0x02 +#define BROWSEMODE_OBJS 0x04 +#define BROWSEMODE_PROPS 0x08 +#define BROWSEMODE_SUBOBJS 0x10 + +#define INPUTMODE_NEWLIB 1 +#define INPUTMODE_NEWMACRO 2 +#define INPUTMODE_RENAME 3 + +typedef ::std::hash_map < ::rtl::OUString, ::rtl::OUString , + ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > Selection_hash; + +class SFEntry; + +class SFTreeListBox : public SvTreeListBox +{ + friend class SvxScriptOrgDialog; +private: + USHORT nMode; + Image m_hdImage; + Image m_hdImage_hc; + Image m_libImage; + Image m_libImage_hc; + Image m_macImage; + Image m_macImage_hc; + Image m_docImage; + Image m_docImage_hc; + ::rtl::OUString m_sMyMacros; + ::rtl::OUString m_sProdMacros; + + ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode > + getLangNodeFromRootNode( ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode >& root, ::rtl::OUString& language ); + void delUserData( SvLBoxEntry* pEntry ); + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getDocumentModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xCtx, ::rtl::OUString& docName ); + +protected: + void ExpandTree( SvLBoxEntry* pRootEntry ); + virtual void RequestingChilds( SvLBoxEntry* pParent ); + virtual void ExpandedHdl(); + virtual long ExpandingHdl(); +public: + void Init( const ::rtl::OUString& language ); + void RequestSubEntries( SvLBoxEntry* pRootEntry, ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode >& node, + ::com::sun::star::uno::Reference< com::sun::star::frame::XModel>& model ); + SFTreeListBox( Window* pParent, const ResId& rRes ); + ~SFTreeListBox(); + + void ExpandAllTrees(); + + + + SvLBoxEntry * insertEntry(String const & rText, USHORT nBitmap, + SvLBoxEntry * pParent, + bool bChildrenOnDemand, + std::auto_ptr< SFEntry > aUserData, + ::rtl::OUString factoryURL ); + SvLBoxEntry * insertEntry(String const & rText, USHORT nBitmap, + SvLBoxEntry * pParent, + bool bChildrenOnDemand, + std::auto_ptr< SFEntry > aUserData ); + void deleteTree( SvLBoxEntry * pEntry ); + void deleteAllTree( ); +}; + +class InputDialog : public ModalDialog +{ +private: + FixedText aText; + Edit aEdit; + OKButton aOKButton; + CancelButton aCancelButton; + +public: + InputDialog( Window * pParent, USHORT nMode ); + ~InputDialog(); + + String GetObjectName() const { return aEdit.GetText(); } + void SetObjectName( const String& rName ) { aEdit.SetText( rName ); aEdit.SetSelection( Selection( 0, rName.Len() ) );} +}; + +class SFEntry +{ +private: + BYTE nType; + bool loaded; + ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode > nodes; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > model; + SFEntry(){} +public: + SFEntry( BYTE nT ) { nType = nT; loaded=false; } + SFEntry( BYTE nT, + const ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode >& entryNodes , + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& entryModel) { nType = nT; nodes = entryNodes; loaded=false; model = entryModel; } + SFEntry( const SFEntry& r ) { nType = r.nType; nodes = r.nodes; loaded = r.loaded; } + virtual ~SFEntry() {} + ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode > GetNode() { return nodes ;} + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > GetModel() { return model ;}; + BYTE GetType() const { return nType; } + bool isLoaded() const { return loaded; } + void setLoaded() { loaded=true; } +}; + +class SvxScriptOrgDialog : public SfxModalDialog +{ +protected: + FixedText aScriptsTxt; + SFTreeListBox aScriptsBox; + + PushButton aRunButton; + CancelButton aCloseButton; + PushButton aCreateButton; + PushButton aEditButton; + PushButton aRenameButton; + PushButton aDelButton; + HelpButton aHelpButton; + + ::rtl::OUString m_sLanguage; + static Selection_hash m_lastSelection; + const String m_delErrStr; + const String m_delErrTitleStr; + const String m_delQueryStr; + const String m_delQueryTitleStr; + const String m_createErrStr; + const String m_createDupStr; + const String m_createErrTitleStr; + const String m_renameErrStr; + const String m_renameDupStr; + const String m_renameErrTitleStr; + + DECL_LINK( MacroSelectHdl, SvTreeListBox * ); + DECL_LINK( MacroDoubleClickHdl, SvTreeListBox * ); + DECL_LINK( ScriptSelectHdl, SvTreeListBox * ); + DECL_LINK( ButtonHdl, Button * ); + BOOL getBoolProperty( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xProps, ::rtl::OUString& propName ); + void CheckButtons( ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode >& node ); + + void createEntry( SvLBoxEntry* pEntry ); + void renameEntry( SvLBoxEntry* pEntry ); + void deleteEntry( SvLBoxEntry* pEntry ); + ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode > + getBrowseNode( SvLBoxEntry* pEntry ); + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > getModel( SvLBoxEntry* pEntry ); + String getListOfChildren( ::com::sun::star::uno::Reference< com::sun::star::script::browse::XBrowseNode > node, int depth ); + void StoreCurrentSelection(); + void RestorePreviousSelection(); + //String GetInfo( SbxVariable* pVar ); + +public: + // prob need another arg in the ctor + // to specify the language or provider + SvxScriptOrgDialog( Window* pParent, ::rtl::OUString language ); + ~SvxScriptOrgDialog(); + + virtual short Execute(); + + //DECL_LINK( ActivatePageHdl, TabControl * ); +}; + +class SvxScriptErrorDialog : public VclAbstractDialog +{ +private: + + ::rtl::OUString m_sMessage; + + DECL_LINK( ShowDialog, ::rtl::OUString* ); + +public: + + SvxScriptErrorDialog( + Window* parent, ::com::sun::star::uno::Any aException ); + + ~SvxScriptErrorDialog(); + + short Execute(); +}; + +#endif // _SCRIPTDLG_HXX diff --git a/cui/source/inc/sdrcelldlg.hxx b/cui/source/inc/sdrcelldlg.hxx new file mode 100644 index 000000000000..fec72bfc07b6 --- /dev/null +++ b/cui/source/inc/sdrcelldlg.hxx @@ -0,0 +1,63 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_FORMAT_CELLS_DLG_HXX +#define _SVX_FORMAT_CELLS_DLG_HXX + + +#include <sfx2/tabdlg.hxx> + +class XColorTable; +class XGradientList; +class XHatchList; +class XBitmapList; +class SdrModel; + +class SvxFormatCellsDialog : public SfxTabDialog +{ +private: + const SfxItemSet& mrOutAttrs; + + XColorTable* mpColorTab; + XGradientList* mpGradientList; + XHatchList* mpHatchingList; + XBitmapList* mpBitmapList; + +protected: + virtual void Apply(); + +public: + SvxFormatCellsDialog( Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel ); + ~SvxFormatCellsDialog(); + + virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + +}; + +#endif // _SVX_FORMAT_CELLS_DLG_HXX + + diff --git a/cui/source/inc/selector.hxx b/cui/source/inc/selector.hxx new file mode 100644 index 000000000000..3c01b955a474 --- /dev/null +++ b/cui/source/inc/selector.hxx @@ -0,0 +1,240 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVXSELECTOR_HXX +#define _SVXSELECTOR_HXX + +#include <vcl/lstbox.hxx> +#include <vcl/fixed.hxx> +#include <vcl/group.hxx> +#include <vcl/menubtn.hxx> +#include <svtools/svtreebx.hxx> + +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/frame/XFrame.hpp> +#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/script/browse/XBrowseNode.hpp> + +#define _SVSTDARR_USHORTS +#define _SVSTDARR_STRINGSDTOR +#include <svl/svstdarr.hxx> // SvUShorts +#include <sfx2/minarray.hxx> + +#define SVX_CFGGROUP_FUNCTION 1 +#define SVX_CFGFUNCTION_SLOT 2 +#define SVX_CFGGROUP_SCRIPTCONTAINER 3 +#define SVX_CFGFUNCTION_SCRIPT 4 + +struct SvxGroupInfo_Impl +{ + USHORT nKind; + USHORT nOrd; + ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode > + xBrowseNode; + ::rtl::OUString sURL; + ::rtl::OUString sHelpText; + BOOL bWasOpened; + + SvxGroupInfo_Impl( USHORT n, USHORT nr ) + :nKind( n ) + ,nOrd( nr ) + ,xBrowseNode() + ,sURL() + ,sHelpText() + ,bWasOpened(FALSE) + { + } + + SvxGroupInfo_Impl( USHORT n, USHORT nr, const ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode >& _rxNode ) + :nKind( n ) + ,nOrd( nr ) + ,xBrowseNode( _rxNode ) + ,sURL() + ,sHelpText() + ,bWasOpened(FALSE) + { + } + + SvxGroupInfo_Impl( USHORT n, USHORT nr, const ::rtl::OUString& _rURL, const ::rtl::OUString& _rHelpText ) + :nKind( n ) + ,nOrd( nr ) + ,xBrowseNode() + ,sURL( _rURL ) + ,sHelpText( _rHelpText ) + ,bWasOpened(FALSE) + { + } +}; + +typedef SvxGroupInfo_Impl* SvxGroupInfoPtr; +SV_DECL_PTRARR_DEL(SvxGroupInfoArr_Impl, SvxGroupInfoPtr, 5, 5) + +class ImageProvider +{ +public: + virtual ~ImageProvider() {} + + virtual Image GetImage( const rtl::OUString& rCommandURL ) = 0; +}; + +class SvxConfigFunctionListBox_Impl : public SvTreeListBox +{ +friend class SvxConfigGroupListBox_Impl; + Timer aTimer; + SvLBoxEntry* pCurEntry; + SvxGroupInfoArr_Impl aArr; + SvLBoxEntry* m_pDraggingEntry; + + DECL_LINK( TimerHdl, Timer* ); + virtual void MouseMove( const MouseEvent& rMEvt ); + +public: + SvxConfigFunctionListBox_Impl( Window*, const ResId& ); + ~SvxConfigFunctionListBox_Impl(); + void ClearAll(); + String GetHelpText( SvLBoxEntry *pEntry ); + using Window::GetHelpText; + SvLBoxEntry* GetLastSelectedEntry(); + void FunctionSelected(); + + // drag n drop methods + virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ); + + virtual DragDropMode NotifyStartDrag( + TransferDataContainer&, SvLBoxEntry* ); + + virtual void DragFinished( sal_Int8 ); +}; + +class SvxConfigGroupListBox_Impl : public SvTreeListBox +{ + SvxGroupInfoArr_Impl aArr; + bool m_bShowSlots; + + SvxConfigFunctionListBox_Impl* pFunctionListBox; + ImageProvider* m_pImageProvider; + + ::com::sun::star::uno::Reference + < ::com::sun::star::frame::XFrame > m_xFrame; + + ::com::sun::star::uno::Reference + < ::com::sun::star::container::XNameAccess > m_xModuleCommands; + + Image m_hdImage; + Image m_hdImage_hc; + Image m_libImage; + Image m_libImage_hc; + Image m_macImage; + Image m_macImage_hc; + Image m_docImage; + Image m_docImage_hc; + ::rtl::OUString m_sMyMacros; + ::rtl::OUString m_sProdMacros; + Image GetImage( ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode > node, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xCtx, bool bIsRootNode, bool bHighContrast ); + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getDocumentModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xCtx, ::rtl::OUString& docName ); + +private: + void fillScriptList( + const ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode >& _rxRootNode, + SvLBoxEntry* _pParentEntry, + bool _bCheapChildsOnDemand + ); + +protected: + virtual void RequestingChilds( SvLBoxEntry *pEntry); + virtual BOOL Expand( SvLBoxEntry* pParent ); + using SvListView::Expand; + +public: + SvxConfigGroupListBox_Impl ( + Window* pParent, const ResId&, + bool _bShowSlots, + const ::com::sun::star::uno::Reference + < ::com::sun::star::frame::XFrame >& xFrame + ); + + ~SvxConfigGroupListBox_Impl(); + + void Init(); + void Open( SvLBoxEntry*, BOOL ); + void ClearAll(); + void GroupSelected(); + + void SetFunctionListBox( SvxConfigFunctionListBox_Impl *pBox ) + { pFunctionListBox = pBox; } + + void SetImageProvider( ImageProvider* provider ) + { m_pImageProvider = provider; } +}; + +class SvxScriptSelectorDialog : public ModelessDialog +{ + FixedText aDialogDescription; + FixedText aGroupText; + SvxConfigGroupListBox_Impl aCategories; + FixedText aFunctionText; + SvxConfigFunctionListBox_Impl aCommands; + OKButton aOKButton; + CancelButton aCancelButton; + HelpButton aHelpButton; + FixedLine aDescription; + FixedText aDescriptionText; + + BOOL m_bShowSlots; + Link m_aAddHdl; + + DECL_LINK( ClickHdl, Button * ); + DECL_LINK( SelectHdl, Control* ); + DECL_LINK( FunctionDoubleClickHdl, Control* ); + + void UpdateUI(); + void ResizeControls(); + +public: + + SvxScriptSelectorDialog ( + Window* pParent = NULL, + BOOL bShowSlots = FALSE, + const ::com::sun::star::uno::Reference + < ::com::sun::star::frame::XFrame >& xFrame = 0 + ); + + ~SvxScriptSelectorDialog ( ); + + void SetAddHdl( const Link& rLink ) { m_aAddHdl = rLink; } + const Link& GetAddHdl() const { return m_aAddHdl; } + + void SetImageProvider( ImageProvider* provider ) + { aCategories.SetImageProvider( provider ); } + + String GetScriptURL() const; + String GetSelectedDisplayName(); + String GetSelectedHelpText(); + void SetRunLabel(); + void SetDialogDescription(const String& rDescription); +}; + +#endif diff --git a/cui/source/inc/showcols.hxx b/cui/source/inc/showcols.hxx new file mode 100644 index 000000000000..cdb5a2f89eea --- /dev/null +++ b/cui/source/inc/showcols.hxx @@ -0,0 +1,66 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_SHOWCOLS_HXX +#define _SVX_SHOWCOLS_HXX + +#include <vcl/dialog.hxx> +#include <vcl/lstbox.hxx> +#include <vcl/fixed.hxx> + +#ifndef _SV_BUTTON_HXX //autogen +#include <vcl/button.hxx> +#endif +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/container/XIndexContainer.hpp> + +//========================================================================== +// FmShowColsDialog +//========================================================================== + +class FmShowColsDialog : public ModalDialog +{ + ListBox m_aList; + FixedText m_aLabel; + OKButton m_aOK; + CancelButton m_aCancel; + + ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > m_xColumns; + +public: + FmShowColsDialog( Window* pParent ); + virtual ~FmShowColsDialog(); + + void SetColumns(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer>& xCols); + +protected: + DECL_LINK( OnClickedOk, Button* ); +}; + +#endif // _SVX_SHOWCOLS_HXX + diff --git a/cui/source/inc/splitcelldlg.hxx b/cui/source/inc/splitcelldlg.hxx new file mode 100644 index 000000000000..fc1640fd1dea --- /dev/null +++ b/cui/source/inc/splitcelldlg.hxx @@ -0,0 +1,69 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_SPLITCELLDLG_HXX +#define _SVX_SPLITCELLDLG_HXX + +#include <vcl/fixed.hxx> +#include <vcl/field.hxx> +#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> + +#include <svx/stddlg.hxx> +#include <svx/svxdlg.hxx> + +class SvxSplitTableDlg : public SvxAbstractSplittTableDialog, public SvxStandardDialog +{ + FixedText maCountLbl; + NumericField maCountEdit; + FixedLine maCountFL; + ImageRadioButton maHorzBox; + ImageRadioButton maVertBox; + CheckBox maPropCB; + FixedLine maDirFL; + OKButton maOKBtn; + CancelButton maCancelBtn; + HelpButton maHelpBtn; + + long mnMaxVertical; + long mnMaxHorizontal; +protected: + virtual void Apply(); + +public: + SvxSplitTableDlg(Window *pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal ); + virtual ~SvxSplitTableDlg(); + + DECL_LINK( ClickHdl, Button * ); + + virtual bool IsHorizontal() const; + virtual bool IsProportional() const; + virtual long GetCount() const; + + virtual short Execute(); +}; + +#endif diff --git a/cui/source/inc/srchxtra.hxx b/cui/source/inc/srchxtra.hxx new file mode 100644 index 000000000000..1cf2e91e6511 --- /dev/null +++ b/cui/source/inc/srchxtra.hxx @@ -0,0 +1,108 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_SRCHXTRA_HXX +#define _SVX_SRCHXTRA_HXX + +// include --------------------------------------------------------------- + +#include <vcl/field.hxx> +#include <svtools/ctrltool.hxx> +#include <sfx2/tabdlg.hxx> + +#include <svx/checklbx.hxx> +#include <svx/srchdlg.hxx> + +// class SvxSearchFormatDialog ------------------------------------------- + +class SvxSearchFormatDialog : public SfxTabDialog +{ +public: + SvxSearchFormatDialog( Window* pParent, const SfxItemSet& rSet ); + ~SvxSearchFormatDialog(); + +protected: + virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + +private: + FontList* pFontList; +}; + +// class SvxSearchFormatDialog ------------------------------------------- + +class SvxSearchAttributeDialog : public ModalDialog +{ +public: + SvxSearchAttributeDialog( Window* pParent, SearchAttrItemList& rLst, + const USHORT* pWhRanges ); + +private: + FixedText aAttrFL; + SvxCheckListBox aAttrLB; + + OKButton aOKBtn; + CancelButton aEscBtn; + HelpButton aHelpBtn; + + SearchAttrItemList& rList; + + DECL_LINK( OKHdl, Button * ); +}; + +// class SvxSearchSimilarityDialog --------------------------------------- + +class SvxSearchSimilarityDialog : public ModalDialog +{ +private: + FixedLine aFixedLine; + FixedText aOtherTxt; + NumericField aOtherFld; + FixedText aLongerTxt; + NumericField aLongerFld; + FixedText aShorterTxt; + NumericField aShorterFld; + CheckBox aRelaxBox; + + OKButton aOKBtn; + CancelButton aEscBtn; + HelpButton aHelpBtn; + +public: + SvxSearchSimilarityDialog( Window* pParent, + BOOL bRelax, + USHORT nOther, + USHORT nShorter, + USHORT nLonger ); + + USHORT GetOther() { return (USHORT)aOtherFld.GetValue(); } + USHORT GetShorter() { return (USHORT)aShorterFld.GetValue(); } + USHORT GetLonger() { return (USHORT)aLongerFld.GetValue(); } + BOOL IsRelaxed() { return aRelaxBox.IsChecked(); } +}; + + +#endif + diff --git a/cui/source/inc/tabstpge.hxx b/cui/source/inc/tabstpge.hxx new file mode 100644 index 000000000000..80e22eff43b5 --- /dev/null +++ b/cui/source/inc/tabstpge.hxx @@ -0,0 +1,159 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_TABSTPGE_HXX +#define _SVX_TABSTPGE_HXX + +// include --------------------------------------------------------------- + +#include <vcl/group.hxx> +#include <vcl/edit.hxx> +#include <vcl/field.hxx> +#include <vcl/fixed.hxx> +#include <sfx2/tabdlg.hxx> + +#include <editeng/tstpitem.hxx> +#include <svx/flagsdef.hxx> + +// forward --------------------------------------------------------------- + +class TabWin_Impl; + +// define ---------------------------------------------------------------- + +// Bitfelder f"ur DisableControls() +//CHINA001 #define TABTYPE_LEFT 0x0001 +//CHINA001 #define TABTYPE_RIGHT 0x0002 +//CHINA001 #define TABTYPE_CENTER 0x0004 +//CHINA001 #define TABTYPE_DEZIMAL 0x0008 +//CHINA001 #define TABTYPE_ALL 0x000F +//CHINA001 +//CHINA001 #define TABFILL_NONE 0x0010 +//CHINA001 #define TABFILL_POINT 0x0020 +//CHINA001 #define TABFILL_DASHLINE 0x0040 +//CHINA001 #define TABFILL_SOLIDLINE 0x0080 +//CHINA001 #define TABFILL_SPECIAL 0x0100 +//CHINA001 #define TABFILL_ALL 0x01F0 + +// class SvxTabulatorTabPage --------------------------------------------- +/* + {k:\svx\prototyp\dialog\tabstop.bmp} + + [Beschreibung] + In dieser TabPage werden Tabulatoren verwaltet. + + [Items] + <SvxTabStopItem><SID_ATTR_TABSTOP> + <SfxUInt16Item><SID_ATTR_TABSTOP_DEFAULTS> + <SfxUInt16Item><SID_ATTR_TABSTOP_POS> + <SfxInt32Item><SID_ATTR_TABSTOP_OFFSET> +*/ + +class SvxTabulatorTabPage : public SfxTabPage +{ + using TabPage::DeactivatePage; + +public: + ~SvxTabulatorTabPage(); + + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + + void DisableControls( const USHORT nFlag ); + +protected: + virtual int DeactivatePage( SfxItemSet* pSet = 0 ); + +private: + SvxTabulatorTabPage( Window* pParent, const SfxItemSet& rSet ); + + // Tabulatoren und Positionen + MetricBox aTabBox; + FixedLine aTabLabel; + FixedLine aTabLabelVert; + + // TabType + RadioButton aLeftTab; + RadioButton aRightTab; + RadioButton aCenterTab; + RadioButton aDezTab; + + TabWin_Impl* pLeftWin; + TabWin_Impl* pRightWin; + TabWin_Impl* pCenterWin; + TabWin_Impl* pDezWin; + + FixedText aDezCharLabel; + Edit aDezChar; + FixedLine aTabTypeLabel; + + // Fuellzeichen + RadioButton aNoFillChar; + RadioButton aFillPoints; + RadioButton aFillDashLine ; + RadioButton aFillSolidLine; + RadioButton aFillSpecial; + Edit aFillChar; + FixedLine aFillLabel; + + // Buttons + PushButton aNewBtn; + PushButton aDelAllBtn; + PushButton aDelBtn; + + // lokale Variablen, interne Funktionen + SvxTabStop aAktTab; + SvxTabStopItem aNewTabs; + long nDefDist; + FieldUnit eDefUnit; + BOOL bCheck; + +#ifdef _SVX_TABSTPGE_CXX + void InitTabPos_Impl( USHORT nPos = 0 ); + void SetFillAndTabType_Impl(); + + // Handler + DECL_LINK( NewHdl_Impl, Button* ); + DECL_LINK( DelHdl_Impl, Button* ); + DECL_LINK( DelAllHdl_Impl, Button* ); + + DECL_LINK( FillTypeCheckHdl_Impl, RadioButton* ); + DECL_LINK( TabTypeCheckHdl_Impl, RadioButton* ); + + DECL_LINK( SelectHdl_Impl, MetricBox* ); + DECL_LINK( ModifyHdl_Impl, MetricBox* ); + DECL_LINK( GetFillCharHdl_Impl, Edit* ); + DECL_LINK( GetDezCharHdl_Impl, Edit* ); +#endif + virtual void PageCreated(SfxAllItemSet aSet); // add CHINA001 +}; + +#endif // #ifndef _SVX_TABSTPGE_HXX + + diff --git a/cui/source/inc/textanim.hxx b/cui/source/inc/textanim.hxx new file mode 100644 index 000000000000..5f58258ea255 --- /dev/null +++ b/cui/source/inc/textanim.hxx @@ -0,0 +1,128 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_TEXTANIM_HXX +#define _SVX_TEXTANIM_HXX + +// include --------------------------------------------------------------- + +#include <vcl/field.hxx> +#include <sfx2/tabdlg.hxx> +#include <svx/svdattr.hxx> +#include <vcl/fixed.hxx> +#include <vcl/lstbox.hxx> +#include <vcl/group.hxx> + +class SdrView; + +/************************************************************************* +|* +|* Page zum "Andern von TextAnimationen (Lauftext etc.) +|* +\************************************************************************/ + +class SvxTextAnimationPage : public SfxTabPage +{ +private: + FixedLine aFlEffect; + FixedText aFtEffects; + ListBox aLbEffect; + //ValueSet aCtlEffect; + FixedText aFtDirection; + ImageButton aBtnUp; + ImageButton aBtnLeft; + ImageButton aBtnRight; + ImageButton aBtnDown; + + FixedLine aFlProperties; + TriStateBox aTsbStartInside; + TriStateBox aTsbStopInside; + + FixedText aFtCount; + TriStateBox aTsbEndless; + NumericField aNumFldCount; + + FixedText aFtAmount; + TriStateBox aTsbPixel; + MetricField aMtrFldAmount; + + FixedText aFtDelay; + TriStateBox aTsbAuto; + MetricField aMtrFldDelay; + + const SfxItemSet& rOutAttrs; + SdrTextAniKind eAniKind; + FieldUnit eFUnit; + SfxMapUnit eUnit; + +#ifdef _SVX_TEXTANIM_CXX + DECL_LINK( SelectEffectHdl_Impl, void * ); + DECL_LINK( ClickEndlessHdl_Impl, void * ); + DECL_LINK( ClickAutoHdl_Impl, void * ); + DECL_LINK( ClickPixelHdl_Impl, void * ); + DECL_LINK( ClickDirectionHdl_Impl, ImageButton * ); + + void SelectDirection( SdrTextAniDirection nValue ); + USHORT GetSelectedDirection(); +#endif + +public: + + SvxTextAnimationPage( Window* pWindow, const SfxItemSet& rInAttrs ); + ~SvxTextAnimationPage(); + + static SfxTabPage* Create( Window*, const SfxItemSet& ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet & ); + + void Construct(); +}; + +/************************************************************************* +|* +|* Text-Tab-Dialog +|* +\************************************************************************/ +class SvxTextTabDialog : public SfxTabDialog +{ +private: + const SfxItemSet& rOutAttrs; + const SdrView* pView; + + virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + +public: + + SvxTextTabDialog( Window* pParent, const SfxItemSet* pAttr, + const SdrView* pView ); + ~SvxTextTabDialog() {}; +}; + + +#endif // _SVX_TEXTANIM_HXX + diff --git a/cui/source/inc/textattr.hxx b/cui/source/inc/textattr.hxx new file mode 100644 index 000000000000..e8ce016d7d6f --- /dev/null +++ b/cui/source/inc/textattr.hxx @@ -0,0 +1,135 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_TEXTATTR_HXX +#define _SVX_TEXTATTR_HXX + +// include --------------------------------------------------------------- + +#include <svx/dlgctrl.hxx> + +#ifndef _GROUP_HXX //autogen +#include <vcl/group.hxx> +#endif + +#ifndef _FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif +#include <sfx2/basedlgs.hxx> + +class SdrView; + +/************************************************************************* +|* +|* Dialog zum "Andern von TextAttributen +|* +\************************************************************************/ + +class SvxTextAttrPage : public SvxTabPage +{ +private: + FixedLine aFlText; + TriStateBox aTsbAutoGrowWidth; + TriStateBox aTsbAutoGrowHeight; + TriStateBox aTsbFitToSize; + TriStateBox aTsbContour; + TriStateBox aTsbWordWrapText; + TriStateBox aTsbAutoGrowSize; + + + FixedLine aFlDistance; + FixedText aFtLeft; + MetricField aMtrFldLeft; + FixedText aFtRight; + MetricField aMtrFldRight; + FixedText aFtTop; + MetricField aMtrFldTop; + FixedText aFtBottom; + MetricField aMtrFldBottom; + + FixedLine aFlSeparator; + + FixedLine aFlPosition; + SvxRectCtl aCtlPosition; + TriStateBox aTsbFullWidth; + + const SfxItemSet& rOutAttrs; + const SdrView* pView; + + BOOL bAutoGrowSizeEnabled; + BOOL bContourEnabled; + BOOL bAutoGrowWidthEnabled; + BOOL bAutoGrowHeightEnabled; + BOOL bWordWrapTextEnabled; + BOOL bFitToSizeEnabled; + + +#ifdef _SVX_TEXTATTR_CXX + DECL_LINK( ClickFullWidthHdl_Impl, void * ); + DECL_LINK( ClickHdl_Impl, void * ); +#endif + + /** Return whether the text direction is from left to right (</TRUE>) or + top to bottom (</FALSE>). + */ + bool IsTextDirectionLeftToRight (void) const; + +public: + + SvxTextAttrPage( Window* pWindow, const SfxItemSet& rInAttrs ); + ~SvxTextAttrPage(); + + static SfxTabPage* Create( Window*, const SfxItemSet& ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet & ); + + virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); + + void Construct(); + void SetView( const SdrView* pSdrView ) { pView = pSdrView; } + virtual void PageCreated(SfxAllItemSet aSet); // add CHINA001 +}; + +/************************************************************************* +|* +|* Von SfxSingleTabDialog abgeleitet, um vom Control "uber virtuelle Methode +|* benachrichtigt werden zu k"onnen. +|* +\************************************************************************/ + +//CHINA001 class SvxTextAttrDialog : public SfxSingleTabDialog +//CHINA001 { +//CHINA001 public: +//CHINA001 SvxTextAttrDialog( Window* pParent, const SfxItemSet& rAttr, +//CHINA001 const SdrView* pView ); +//CHINA001 ~SvxTextAttrDialog(); +//CHINA001 }; + + +#endif // _SVX_TEXTATTR_HXX + diff --git a/cui/source/inc/thesdlg.hxx b/cui/source/inc/thesdlg.hxx new file mode 100644 index 000000000000..99b292b560a5 --- /dev/null +++ b/cui/source/inc/thesdlg.hxx @@ -0,0 +1,61 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_THESDLG_HXX +#define _SVX_THESDLG_HXX + + +#include <com/sun/star/linguistic2/XThesaurus.hpp> + +#include "svx/stddlg.hxx" +#include "svx/svxdllapi.h" + +#include <memory> + + +///////////////////////////////////////////////////////////////// + +struct SvxThesaurusDialog_Impl; + +class SvxThesaurusDialog : public SvxStandardDialog +{ + std::auto_ptr< SvxThesaurusDialog_Impl > m_pImpl; + + SVX_DLLPRIVATE virtual void Apply(); + +public: + SvxThesaurusDialog( Window* pParent, + ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XThesaurus > xThesaurus, + const String &rWord, LanguageType nLanguage ); + ~SvxThesaurusDialog(); + + void SetWindowTitle( LanguageType nLanguage ); + String GetWord(); + sal_uInt16 GetLanguage() const; +}; + +#endif + diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx new file mode 100644 index 000000000000..d333237f55c7 --- /dev/null +++ b/cui/source/inc/transfrm.hxx @@ -0,0 +1,305 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_TRANSFRM_HXX +#define _SVX_TRANSFRM_HXX + +// include --------------------------------------------------------------- + +#include <svx/dlgctrl.hxx> + +#ifndef _FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif + +// #i75273# +#include <basegfx/range/b2drange.hxx> + +// predefines +class SdrView; + +/************************************************************************* +|* +|* Transform-Tab-Dialog +|* +\************************************************************************/ + +/** put this into the nAnchorTypes parameter of the SvxTransformTabDialog c'tor + to disable the size controls */ +const USHORT SVX_OBJ_NORESIZE = 0x0100; + +/** put this into the nAnchorTypes parameter of the SvxTransformTabDialog c'tor + to disable the protect controls */ +const USHORT SVX_OBJ_NOPROTECT = 0x0200; + +class SvxTransformTabDialog : public SfxTabDialog +{ +private: + const SdrView* pView; + + USHORT nAnchorCtrls; + Link aValidateLink; + + virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + +public: + + SvxTransformTabDialog( Window* pParent, const SfxItemSet* pAttr, + const SdrView* pView, + USHORT nAnchorTypes = 0); + ~SvxTransformTabDialog(); + + //link for the Writer to validate positions + void SetValidateFramePosLink( const Link& rLink ); +}; + +/************************************************************************* +|* +|* position and size tab page +|* +\************************************************************************/ + +class SvxPositionSizeTabPage : public SvxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + +private: + // position + FixedLine maFlPosition; + FixedText maFtPosX; + MetricField maMtrPosX; + FixedText maFtPosY; + MetricField maMtrPosY; + FixedText maFtPosReference; + SvxRectCtl maCtlPos; + + // size + FixedLine maFlSize; + FixedText maFtWidth; + MetricField maMtrWidth; + FixedText maFtHeight; + MetricField maMtrHeight; + CheckBox maCbxScale; + FixedText maFtSizeReference; + SvxRectCtl maCtlSize; + + // protect + FixedLine maFlProtect; + TriStateBox maTsbPosProtect; + TriStateBox maTsbSizeProtect; + + // adjust + FixedLine maFlAdjust; + TriStateBox maTsbAutoGrowWidth; + TriStateBox maTsbAutoGrowHeight; + + FixedLine maFlDivider; + +private: + const SfxItemSet& mrOutAttrs; + + const SdrView* mpView; + + // #i75273# + basegfx::B2DRange maRange; + basegfx::B2DRange maWorkRange; + basegfx::B2DPoint maAnchor; + + SfxMapUnit mePoolUnit; + FieldUnit meDlgUnit; + MapUnit meMapUnit; + TriState mnProtectSizeState; + bool mbPageDisabled; + bool mbProtectDisabled; + bool mbSizeDisabled; + bool mbAdjustDisabled; + + // frome size + // #i75273# + double mfOldWidth; + double mfOldHeight; + RECT_POINT meRP; + + //------------------------------------ +#if _SOLAR__PRIVATE + DECL_LINK( ChangePosProtectHdl, void * ); + DECL_LINK( ChangeSizeProtectHdl, void * ); + DECL_LINK( ChangePosXHdl, void * ); + DECL_LINK( ChangePosYHdl, void * ); +// DECL_LINK( SetAnchorHdl, ListBox * ); +// DECL_LINK( SetOrientHdl, ListBox * ); + + void SetMinMaxPosition(); + void GetTopLeftPosition(double& rfX, double& rfY, const basegfx::B2DRange& rRange); +#endif + +#if _SOLAR__PRIVATE + DECL_LINK( ChangeWidthHdl, void * ); + DECL_LINK( ChangeHeightHdl, void * ); + DECL_LINK( ClickSizeProtectHdl, void * ); + DECL_LINK( ClickAutoHdl, void * ); + + void SetMaxSize( Rectangle aRect ); + Rectangle GetRect(); +#endif + +public: + SvxPositionSizeTabPage( Window* pParent, const SfxItemSet& rInAttrs ); + + static SfxTabPage* Create( Window*, const SfxItemSet& ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet & ); + + virtual void ActivatePage( const SfxItemSet& rSet ); + virtual int DeactivatePage( SfxItemSet* pSet ); + + virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); + + void Construct(); + void SetView( const SdrView* pSdrView ) { mpView = pSdrView; } + +// void ShowAnchorCtrls(USHORT nAnchorCtrls); // Writer-spezifische Controls anzeigen + virtual void FillUserData(); + + void DisableResize(); + void DisableProtect(); + + void UpdateControlStates(); +}; + +/************************************************************************* +|* +|* Drehwinkel-Tab-Page +|* +\************************************************************************/ +class SvxAngleTabPage : public SvxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + +private: + FixedLine aFlPosition; + FixedText aFtPosX; + MetricField aMtrPosX; + FixedText aFtPosY; + MetricField aMtrPosY; + FixedText aFtPosPresets; + SvxRectCtl aCtlRect; + + FixedLine aFlAngle; + FixedText aFtAngle; + MetricField aMtrAngle; + FixedText aFtAnglePresets; + SvxRectCtl aCtlAngle; + + const SfxItemSet& rOutAttrs; + const SdrView* pView; + + // #i75273# + basegfx::B2DRange maRange; + basegfx::B2DPoint maAnchor; + + SfxMapUnit ePoolUnit; + FieldUnit eDlgUnit; + MapUnit eMapUnit; + //------------------------------------ +#if _SOLAR__PRIVATE + DECL_LINK( ModifiedHdl, void * ); +#endif +public: + SvxAngleTabPage( Window* pParent, const SfxItemSet& rInAttrs ); + + static SfxTabPage* Create( Window*, const SfxItemSet& ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet & ); + + virtual void ActivatePage( const SfxItemSet& rSet ); + virtual int DeactivatePage( SfxItemSet* pSet ); + + virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); + + void Construct(); + void SetView( const SdrView* pSdrView ) { pView = pSdrView; } +}; + +/************************************************************************* +|* +|* Schraegstellen/Eckenradius-Tab-Page +|* +\************************************************************************/ +class SvxSlantTabPage : public SvxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + +private: + FixedLine aFlRadius; + FixedText aFtRadius; + MetricField aMtrRadius; + //TriStateBox aTsbVertical; + FixedLine aFlAngle; + FixedText aFtAngle; + MetricField aMtrAngle; + //SvxRectCtl aCtlAngle; + + const SfxItemSet& rOutAttrs; + + const SdrView* pView; + + // #i75273# + basegfx::B2DRange maRange; + + SfxMapUnit ePoolUnit; + FieldUnit eDlgUnit; + MapUnit eMapUnit; + //------------------------------------ +public: + SvxSlantTabPage( Window* pParent, const SfxItemSet& rInAttrs ); + + static SfxTabPage* Create( Window*, const SfxItemSet& ); + static USHORT* GetRanges(); + + virtual BOOL FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet & ); + + virtual void ActivatePage( const SfxItemSet& rSet ); + virtual int DeactivatePage( SfxItemSet* pSet ); + + virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); + + void Construct(); + void SetView( const SdrView* pSdrView ) { pView = pSdrView; } +}; + + + +#endif // _SVX_TRANSFRM_HXX + diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx new file mode 100644 index 000000000000..72859aa70945 --- /dev/null +++ b/cui/source/inc/treeopt.hxx @@ -0,0 +1,352 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include <com/sun/star/uno/Reference.h> +#include <sfx2/basedlgs.hxx> +#include <sfx2/tabdlg.hxx> +#include <svtools/svtreebx.hxx> +#include <tools/resary.hxx> +#include <vcl/image.hxx> +#include <vcl/fixbrd.hxx> +#include <vcl/fixed.hxx> + +#include <vector> + +// static ---------------------------------------------------------------- + +BOOL EnableSSO(); +CreateTabPage GetSSOCreator( void ); + +// class OfaOptionsTreeListBox ------------------------------------------- + +//!#define NUMBER_OF_OPTION_PAGES 12 +class SfxModule; +class SfxShell; +class SfxItemSet; +class XColorTable; +class OfaOptionsTreeListBox : public SvTreeListBox +{ + using SvListView::Collapse; + +private: + BOOL bInCollapse; + +public: + OfaOptionsTreeListBox(Window* pParent, const ResId& rResId) : + SvTreeListBox( pParent, rResId ), bInCollapse(FALSE) {} + + virtual BOOL Collapse( SvLBoxEntry* pParent ); + BOOL IsInCollapse()const {return bInCollapse;} +}; + +// struct OrderedEntry --------------------------------------------------- + +struct OrderedEntry +{ + sal_Int32 m_nIndex; + rtl::OUString m_sId; + + OrderedEntry( sal_Int32 nIndex, const rtl::OUString& rId ) : + m_nIndex( nIndex ), m_sId( rId ) {} +}; + +typedef std::vector< OrderedEntry* > VectorOfOrderedEntries; + +// struct Module --------------------------------------------------------- + +struct Module +{ + rtl::OUString m_sName; + bool m_bActive; + VectorOfOrderedEntries m_aNodeList; + + Module( const rtl::OUString& rName ) : m_sName( rName ), m_bActive( false ) {} +}; + +// struct OptionsLeaf ---------------------------------------------------- + +struct OptionsLeaf +{ + rtl::OUString m_sId; + rtl::OUString m_sLabel; + rtl::OUString m_sPageURL; + rtl::OUString m_sEventHdl; + rtl::OUString m_sGroupId; + sal_Int32 m_nGroupIndex; + + OptionsLeaf( const rtl::OUString& rId, + const rtl::OUString& rLabel, + const rtl::OUString& rPageURL, + const rtl::OUString& rEventHdl, + const rtl::OUString& rGroupId, + sal_Int32 nGroupIndex ) : + m_sId( rId ), + m_sLabel( rLabel ), + m_sPageURL( rPageURL ), + m_sEventHdl( rEventHdl ), + m_sGroupId( rGroupId ), + m_nGroupIndex( nGroupIndex ) {} +}; + +typedef ::std::vector< OptionsLeaf* > VectorOfLeaves; +typedef ::std::vector< VectorOfLeaves > VectorOfGroupedLeaves; + +// struct OptionsNode ---------------------------------------------------- + +struct OptionsNode +{ + rtl::OUString m_sId; + rtl::OUString m_sLabel; + rtl::OUString m_sPageURL; + bool m_bAllModules; + rtl::OUString m_sGroupId; + sal_Int32 m_nGroupIndex; + VectorOfLeaves m_aLeaves; + VectorOfGroupedLeaves m_aGroupedLeaves; + + OptionsNode( const rtl::OUString& rId, + const rtl::OUString& rLabel, + const rtl::OUString& rPageURL, + bool bAllModules, + const rtl::OUString& rGroupId, + sal_Int32 nGroupIndex ) : + m_sId( rId ), + m_sLabel( rLabel ), + m_sPageURL( rPageURL ), + m_bAllModules( bAllModules ), + m_sGroupId( rGroupId ), + m_nGroupIndex( nGroupIndex ) {} + + ~OptionsNode() + { + for ( sal_uInt32 i = 0; i < m_aLeaves.size(); ++i ) + delete m_aLeaves[i]; + m_aLeaves.clear(); + m_aGroupedLeaves.clear(); + } +}; + +typedef ::std::vector< OptionsNode* > VectorOfNodes; + +struct LastPageSaver +{ + USHORT m_nLastPageId; + rtl::OUString m_sLastPageURL_Tools; + rtl::OUString m_sLastPageURL_ExtMgr; + + LastPageSaver() : m_nLastPageId( USHRT_MAX ) {} +}; + +// class OfaTreeOptionsDialog -------------------------------------------- + +namespace com { namespace sun { namespace star { namespace frame { class XFrame; } } } } +namespace com { namespace sun { namespace star { namespace container { class XNameAccess; } } } } +namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; } } } } +namespace com { namespace sun { namespace star { namespace awt { class XContainerWindowProvider; } } } } + +struct OptionsPageInfo; +struct Module; +class ExtensionsTabPage; +typedef std::vector< ExtensionsTabPage* > VectorOfPages; + +class OfaTreeOptionsDialog : public SfxModalDialog +{ +private: + OKButton aOkPB; + CancelButton aCancelPB; + HelpButton aHelpPB; + PushButton aBackPB; + + FixedBorder aHiddenGB; + FixedText aPageTitleFT; + FixedLine aLine1FL; + FixedText aHelpFT; + FixedImage aHelpImg; + + ImageList aPageImages; + ImageList aPageImagesHC; + + ResStringArray aHelpTextsArr; + + OfaOptionsTreeListBox aTreeLB; + + String sTitle; + String sNotLoadedError; + + SvLBoxEntry* pCurrentPageEntry; + + // for the ColorTabPage + SfxItemSet* pColorPageItemSet; + XColorTable* pColorTab; + USHORT nChangeType; + USHORT nUnknownType; + USHORT nUnknownPos; + BOOL bIsAreaTP; + + BOOL bForgetSelection; + BOOL bExternBrowserActive; + BOOL bImageResized; + bool bInSelectHdl_Impl; + bool bIsFromExtensionManager; + + // check "for the current document only" and set focus to "Western" languages box + bool bIsForSetDocumentLanguage; + + Timer aSelectTimer; + + com::sun::star::uno::Reference < com::sun::star::awt::XContainerWindowProvider > + m_xContainerWinProvider; + + static LastPageSaver* pLastPageSaver; + + SfxItemSet* CreateItemSet( USHORT nId ); + void ApplyItemSet( USHORT nId, const SfxItemSet& rSet ); + void InitTreeAndHandler(); + void Initialize( const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& _xFrame ); + void ResizeTreeLB( void ); // resizes dialog so that treelistbox has no horizontal scroll bar + + void LoadExtensionOptions( const rtl::OUString& rExtensionId ); + rtl::OUString GetModuleIdentifier( const com::sun::star::uno::Reference< + com::sun::star::lang::XMultiServiceFactory >& xMFac, + const com::sun::star::uno::Reference< + com::sun::star::frame::XFrame >& xFrame ); + Module* LoadModule( const rtl::OUString& rModuleIdentifier, + const com::sun::star::uno::Reference< + com::sun::star::container::XNameAccess >& xRoot ); + void LoadNodes( const com::sun::star::uno::Reference< + com::sun::star::container::XNameAccess >& xRoot, + Module* pModule, + const rtl::OUString& rExtensionId, + VectorOfNodes& rOutNodeList ); + void InsertNodes( const VectorOfNodes& rNodeList ); + +protected: + DECL_LINK(ExpandedHdl_Impl, SvTreeListBox* ); + DECL_LINK(ShowPageHdl_Impl, SvTreeListBox* ); + DECL_LINK(BackHdl_Impl, PushButton* ); + DECL_LINK( OKHdl_Impl, Button * ); + DECL_LINK( HintHdl_Impl, Timer * ); + DECL_LINK( SelectHdl_Impl, Timer * ); + + virtual long Notify( NotifyEvent& rNEvt ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + virtual short Execute(); + +public: + OfaTreeOptionsDialog( Window* pParent, + const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& _xFrame, + bool bActivateLastSelection = true ); + OfaTreeOptionsDialog( Window* pParent, const rtl::OUString& rExtensionId ); + ~OfaTreeOptionsDialog(); + + OptionsPageInfo* AddTabPage( USHORT nId, const String& rPageName, USHORT nGroup ); + USHORT AddGroup( const String& rGroupName, SfxShell* pCreateShell, + SfxModule* pCreateModule, USHORT nDialogId ); + + void ActivateLastSelection(); + void ActivatePage( USHORT nResId ); + void ActivatePage( const String& rPageURL ); + void ApplyItemSets(); + + USHORT GetColorChanged() const { return nChangeType; } + XColorTable* GetColorTable() { return pColorTab; } + + // helper functions to call the language settings TabPage from the SpellDialog + static void ApplyLanguageOptions(const SfxItemSet& rSet); +}; + +// class OfaPageResource ------------------------------------------------- + +class OfaPageResource : public Resource +{ + ResStringArray aGeneralDlgAry; + ResStringArray aInetDlgAry; + ResStringArray aLangDlgAry; + ResStringArray aTextDlgAry; + ResStringArray aHTMLDlgAry; + ResStringArray aCalcDlgAry; + ResStringArray aStarMathDlgAry; + ResStringArray aImpressDlgAry; + ResStringArray aDrawDlgAry; + ResStringArray aChartDlgAry; + ResStringArray aFilterDlgAry; + ResStringArray aDatasourcesDlgAry; + +public: + OfaPageResource(); + + ResStringArray& GetGeneralArray() {return aGeneralDlgAry;} + ResStringArray& GetInetArray() {return aInetDlgAry;} + ResStringArray& GetLangArray() {return aLangDlgAry;} + ResStringArray& GetTextArray() {return aTextDlgAry;} + ResStringArray& GetHTMLArray() {return aHTMLDlgAry;} + ResStringArray& GetCalcArray() {return aCalcDlgAry;} + ResStringArray& GetStarMathArray() {return aStarMathDlgAry;} + ResStringArray& GetImpressArray() {return aImpressDlgAry;} + ResStringArray& GetDrawArray() {return aDrawDlgAry;} + ResStringArray& GetChartArray() {return aChartDlgAry;} + ResStringArray& GetFilterArray() {return aFilterDlgAry;} + ResStringArray& GetDatasourcesArray() {return aDatasourcesDlgAry;} +}; + +// class ExtensionsTabPage ----------------------------------------------- + +namespace com { namespace sun { namespace star { namespace awt { class XWindow; } } } } +namespace com { namespace sun { namespace star { namespace awt { class XContainerWindowEventHandler; } } } } + +class ExtensionsTabPage : public TabPage +{ +private: + rtl::OUString m_sPageURL; + com::sun::star::uno::Reference< com::sun::star::awt::XWindow > + m_xPage; + rtl::OUString m_sEventHdl; + com::sun::star::uno::Reference< com::sun::star::awt::XContainerWindowEventHandler > + m_xEventHdl; + com::sun::star::uno::Reference< com::sun::star::awt::XContainerWindowProvider > + m_xWinProvider; + bool m_bIsWindowHidden; + + void CreateDialogWithHandler(); + sal_Bool DispatchAction( const rtl::OUString& rAction ); + +public: + ExtensionsTabPage( + Window* pParent, WinBits nStyle, + const rtl::OUString& rPageURL, const rtl::OUString& rEvtHdl, + const com::sun::star::uno::Reference< + com::sun::star::awt::XContainerWindowProvider >& rProvider ); + + virtual ~ExtensionsTabPage(); + + virtual void ActivatePage(); + virtual void DeactivatePage(); + + void ResetPage(); + void SavePage(); +}; + diff --git a/cui/source/inc/zoom.hxx b/cui/source/inc/zoom.hxx new file mode 100644 index 000000000000..9a8c9b03da1c --- /dev/null +++ b/cui/source/inc/zoom.hxx @@ -0,0 +1,114 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_ZOOM_HXX +#define _SVX_ZOOM_HXX + +// include --------------------------------------------------------------- + +#include <layout/layout.hxx> +#include <sfx2/basedlgs.hxx> +#ifndef _SV_BUTTON_HXX //autogen wg. Radio-/OK-/Cancel-/HelpButton +#include <vcl/button.hxx> +#endif +#include <vcl/field.hxx> +#include <vcl/fixed.hxx> + +// define ---------------------------------------------------------------- +/* CHINA001 +#define ZOOMBTN_OPTIMAL ((USHORT)0x0001) +#define ZOOMBTN_PAGEWIDTH ((USHORT)0x0002) +#define ZOOMBTN_WHOLEPAGE ((USHORT)0x0004) +*/ +#ifndef _SVX_ZOOM_HXX +#include "zoom_def.hxx" +#endif +// class SvxZoomDialog --------------------------------------------------- +/* + {k:\svx\prototyp\dialog\zoom.bmp} + + [Beschreibung] + Mit diesem Dialog wird ein Zoom-Faktor eingestellt. + + [Items] + SvxZoomItem <SID_ATTR_ZOOM> +*/ + +#include <layout/layout-pre.hxx> + +class SvxZoomDialog : public SfxModalDialog +{ +private: + FixedLine aZoomFl; + RadioButton aOptimalBtn; + RadioButton aWholePageBtn; + RadioButton aPageWidthBtn; + RadioButton a100Btn; + RadioButton aUserBtn; + MetricField aUserEdit; + + FixedLine aViewLayoutFl; + RadioButton aAutomaticBtn; + RadioButton aSingleBtn; + RadioButton aColumnsBtn; + MetricField aColumnsEdit; + CheckBox aBookModeChk; + + FixedLine aBottomFl; + OKButton aOKBtn; + CancelButton aCancelBtn; + HelpButton aHelpBtn; + + const SfxItemSet& rSet; + SfxItemSet* pOutSet; + BOOL bModified; + +#ifdef _SVX_ZOOM_CXX + DECL_LINK( UserHdl, RadioButton* ); + DECL_LINK( SpinHdl, MetricField* ); + DECL_LINK( ViewLayoutUserHdl, RadioButton* ); + DECL_LINK( ViewLayoutSpinHdl, MetricField* ); + DECL_LINK( ViewLayoutCheckHdl, CheckBox* ); + DECL_LINK( OKHdl, Button* ); +#endif + +public: + SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet ); + ~SvxZoomDialog(); + + const SfxItemSet* GetOutputItemSet() const { return pOutSet; } + + USHORT GetFactor() const; + void SetFactor( USHORT nNewFactor, USHORT nBtnId = 0 ); + + void HideButton( USHORT nBtnId ); + void SetLimits( USHORT nMin, USHORT nMax ); +}; + +#include <layout/layout-post.hxx> + +#endif + |