diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-03-12 18:57:32 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-03-12 18:57:32 -0600 |
commit | 9cd038e5b89c978ea24ba7efa7c3152801190455 (patch) | |
tree | 7d938fd9373eb827095787955e2feffca942b8fd /svx | |
parent | e65c0fe553a9d1b85dcacfff7af9df8231427876 (diff) |
fix mis-merge all-around.
Diffstat (limited to 'svx')
34 files changed, 78 insertions, 1291 deletions
diff --git a/svx/AllLangResTarget_svx.mk b/svx/AllLangResTarget_svx.mk index b2707b01a637..3680c9f92609 100755 --- a/svx/AllLangResTarget_svx.mk +++ b/svx/AllLangResTarget_svx.mk @@ -55,7 +55,6 @@ $(eval $(call gb_SrsTarget_add_files,svx/res,\ svx/source/dialog/fontwork.src \ svx/source/dialog/frmsel.src \ svx/source/dialog/hdft.src \ - svx/source/dialog/hyprlink.src \ svx/source/dialog/imapdlg.src \ svx/source/dialog/langbox.src \ svx/source/dialog/language.src \ @@ -107,30 +106,30 @@ $(call gb_SrsTarget_get_clean_target,svx/res) : $(WORKDIR)/inc/svx/globlmn.hrc_c # just a temporary - globlmn.hrc about to be removed! ifeq ($(strip $(WITH_LANG)),) $(WORKDIR)/inc/svx/globlmn.hrc : $(SRCDIR)/svx/inc/globlmn_tmpl.hrc - echo copying $@ - -mkdir -p $(WORKDIR)/inc/svx - cp $(SRCDIR)/svx/inc/globlmn_tmpl.hrc $(WORKDIR)/inc/svx/globlmn.hrc - rm -f $(WORKDIR)/inc/svx/lastrun.mk + echo copying $@ + -mkdir -p $(WORKDIR)/inc/svx + cp $(SRCDIR)/svx/inc/globlmn_tmpl.hrc $(WORKDIR)/inc/svx/globlmn.hrc + rm -f $(WORKDIR)/inc/svx/lastrun.mk else -include $(WORKDIR)/inc/svx/lastrun.mk ifneq ($(gb_lastrun_globlmn),MERGED) .PHONY : $(WORKDIR)/inc/svx/globlmn.hrc endif $(WORKDIR)/inc/svx/globlmn.hrc : $(SRCDIR)/svx/inc/globlmn_tmpl.hrc $(gb_SrsPartMergeTarget_SDFLOCATION)/svx/inc/localize.sdf - echo merging $@ - -mkdir -p $(WORKDIR)/inc/svx - rm -f $(WORKDIR)/inc/svx/lastrun.mk - echo gb_lastrun_globlmn:=MERGED > $(WORKDIR)/inc/svx/lastrun.mk - $(call gb_Helper_abbreviate_dirs_native, \ - $(gb_SrsPartMergeTarget_TRANSEXCOMMAND) \ - -p svx \ - -i $< -o $@ -m $(gb_SrsPartMergeTarget_SDFLOCATION)/svx/inc/localize.sdf -l all) + echo merging $@ + -mkdir -p $(WORKDIR)/inc/svx + rm -f $(WORKDIR)/inc/svx/lastrun.mk + echo gb_lastrun_globlmn:=MERGED > $(WORKDIR)/inc/svx/lastrun.mk + $(call gb_Helper_abbreviate_dirs_native, \ + $(gb_SrsPartMergeTarget_TRANSEXCOMMAND) \ + -p svx \ + -i $< -o $@ -m $(gb_SrsPartMergeTarget_SDFLOCATION)/svx/inc/localize.sdf -l all) endif .PHONY : $(WORKDIR)/inc/svx/globlmn.hrc_clean $(WORKDIR)/inc/svx/globlmn.hrc_clean : - rm -f $(WORKDIR)/inc/svx/lastrun.mk \ - $(WORKDIR)/inc/svx/globlmn.hrc + rm -f $(WORKDIR)/inc/svx/lastrun.mk \ + $(WORKDIR)/inc/svx/globlmn.hrc # vim: set noet sw=4 ts=4: diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index 4ce5250f77a5..732526c338ce 100755 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -65,7 +65,6 @@ $(eval $(call gb_Library_add_linked_libs,svx,\ ucbhelper \ utl \ vcl \ - vos3 \ xo \ xcr \ $(gb_STDLIBS) \ @@ -117,7 +116,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/dialog/grfflt \ svx/source/dialog/hdft \ svx/source/dialog/hyperdlg \ - svx/source/dialog/hyprlink \ svx/source/dialog/imapdlg \ svx/source/dialog/imapwnd \ svx/source/dialog/measctrl \ diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk index dd31e6b4bdd1..45cf8fa1a867 100755 --- a/svx/Library_svxcore.mk +++ b/svx/Library_svxcore.mk @@ -81,7 +81,6 @@ $(eval $(call gb_Library_add_linked_libs,svxcore,\ ucbhelper \ utl \ vcl \ - vos3 \ xo \ $(gb_STDLIBS) \ )) diff --git a/svx/Module_svx.mk b/svx/Module_svx.mk index d9288ea9e6b1..032f71ffa565 100755 --- a/svx/Module_svx.mk +++ b/svx/Module_svx.mk @@ -34,7 +34,6 @@ $(eval $(call gb_Module_add_targets,svx,\ AllLangResTarget_svx \ AllLangResTarget_ofa \ AllLangResTarget_gal \ - AllLangResTarget_about \ AllLangResTarget_textconversiondlgs \ Package_inc \ Package_sdi \ diff --git a/svx/Package_inc.mk b/svx/Package_inc.mk index 81066e9c7bff..11ad872fd714 100755 --- a/svx/Package_inc.mk +++ b/svx/Package_inc.mk @@ -83,7 +83,6 @@ $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdasitm.hxx,svx/sdasitm.hxx)) $(eval $(call gb_Package_add_file,svx_inc,inc/svx/svddrgmt.hxx,svx/svddrgmt.hxx)) $(eval $(call gb_Package_add_file,svx_inc,inc/svx/xlnasit.hxx,svx/xlnasit.hxx)) $(eval $(call gb_Package_add_file,svx_inc,inc/svx/xlndsit.hxx,svx/xlndsit.hxx)) -$(eval $(call gb_Package_add_file,svx_inc,inc/svx/hyprlink.hxx,svx/hyprlink.hxx)) $(eval $(call gb_Package_add_file,svx_inc,inc/svx/framelinkarray.hxx,svx/framelinkarray.hxx)) $(eval $(call gb_Package_add_file,svx_inc,inc/svx/svdetc.hxx,svx/svdetc.hxx)) $(eval $(call gb_Package_add_file,svx_inc,inc/svx/xflbmtit.hxx,svx/xflbmtit.hxx)) diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx index 67c605fc6e31..968a5b1a4d31 100755 --- a/svx/inc/svdibrow.hxx +++ b/svx/inc/svdibrow.hxx @@ -81,7 +81,7 @@ public: void SetAttributes(const SfxItemSet* pAttr, const SfxItemSet* p2ndSet=NULL); sal_uIntPtr GetCurrentPos() const; sal_uInt16 GetCurrentWhich() const; - virtual bool BegChangeEntry(ULONG nPos); + virtual bool BegChangeEntry(sal_uIntPtr nPos); virtual bool EndChangeEntry(); virtual void BrkChangeEntry(); diff --git a/svx/inc/svx/dlgutil.hxx b/svx/inc/svx/dlgutil.hxx index 2a020f5c536b..5393b6e9dc97 100755 --- a/svx/inc/svx/dlgutil.hxx +++ b/svx/inc/svx/dlgutil.hxx @@ -40,7 +40,7 @@ class SfxItemSet; SVX_DLLPUBLIC FieldUnit GetModuleFieldUnit( const SfxItemSet& ); -SVX_DLLPUBLIC BOOL GetApplyCharUnit( const SfxItemSet& ); +SVX_DLLPUBLIC bool GetApplyCharUnit( const SfxItemSet& ); #define OUTPUT_DRAWMODE_COLOR (DRAWMODE_DEFAULT) #define OUTPUT_DRAWMODE_CONTRAST (DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT) diff --git a/svx/inc/svx/galtheme.hxx b/svx/inc/svx/galtheme.hxx index fc187a51c9bd..4d5f7bf7c313 100755 --- a/svx/inc/svx/galtheme.hxx +++ b/svx/inc/svx/galtheme.hxx @@ -114,7 +114,7 @@ private: void ImplCreateSvDrawStorage(); SVX_DLLPUBLIC SgaObject* ImplReadSgaObject( GalleryObject* pEntry ); - BOOL ImplWriteSgaObject( const SgaObject& rObj, size_t nPos, GalleryObject* pExistentEntry ); + sal_Bool ImplWriteSgaObject( const SgaObject& rObj, size_t nPos, GalleryObject* pExistentEntry ); void ImplRead(); void ImplWrite(); const GalleryObject* ImplGetGalleryObject( size_t nPos ) const @@ -144,11 +144,11 @@ public: size_t GetObjectCount() const { return aObjectList.size(); } SVX_DLLPUBLIC SgaObject* AcquireObject( size_t nPos ); - SVX_DLLPUBLIC void ReleaseObject( SgaObject* pObj ); + SVX_DLLPUBLIC void ReleaseObject( SgaObject* pObj ); - SVX_DLLPUBLIC sal_Bool InsertObject( const SgaObject& rObj, sal_uIntPtr nPos = LIST_APPEND ); - SVX_DLLPUBLIC BOOL RemoveObject( size_t nPos ); - BOOL ChangeObjectPos( size_t nOldPos, size_t nNewPos ); + SVX_DLLPUBLIC bool InsertObject( const SgaObject& rObj, sal_uIntPtr nPos = LIST_APPEND ); + SVX_DLLPUBLIC bool RemoveObject( size_t nPos ); + bool ChangeObjectPos( size_t nOldPos, size_t nNewPos ); SVX_DLLPUBLIC const String& GetName() const; const String& GetRealName() const; diff --git a/svx/inc/svx/svdglue.hxx b/svx/inc/svx/svdglue.hxx index bc3fc5ece547..df208d5185b1 100755 --- a/svx/inc/svx/svdglue.hxx +++ b/svx/inc/svx/svdglue.hxx @@ -75,7 +75,7 @@ class SVX_DLLPUBLIC SdrGluePoint { sal_uInt8 bUserDefined:1; // #i38892# public: SdrGluePoint(): nEscDir(SDRESC_SMART),nId(0),nAlign(0) { bNoPercent=sal_False; bReallyAbsolute=sal_False; bUserDefined=sal_True; } - SdrGluePoint(const Point& rNewPos, bool bNewPercent=TRUE, sal_uInt16 nNewAlign=0): aPos(rNewPos),nEscDir(SDRESC_SMART),nId(0),nAlign(nNewAlign) { bNoPercent=!bNewPercent; bReallyAbsolute=FALSE; bUserDefined=TRUE; } + SdrGluePoint(const Point& rNewPos, bool bNewPercent= sal_True, sal_uInt16 nNewAlign=0): aPos(rNewPos),nEscDir(SDRESC_SMART),nId(0),nAlign(nNewAlign) { bNoPercent=!bNewPercent; bReallyAbsolute = sal_False; bUserDefined = sal_True; } bool operator==(const SdrGluePoint& rCmpGP) const { return aPos==rCmpGP.aPos && nEscDir==rCmpGP.nEscDir && nId==rCmpGP.nId && nAlign==rCmpGP.nAlign && bNoPercent==rCmpGP.bNoPercent && bReallyAbsolute==rCmpGP.bReallyAbsolute && bUserDefined==rCmpGP.bUserDefined; } bool operator!=(const SdrGluePoint& rCmpGP) const { return !operator==(rCmpGP); } const Point& GetPos() const { return aPos; } diff --git a/svx/inc/svx/svdmodel.hxx b/svx/inc/svx/svdmodel.hxx index 8f3fc511db98..510e0b5cdb45 100755 --- a/svx/inc/svx/svdmodel.hxx +++ b/svx/inc/svx/svdmodel.hxx @@ -708,7 +708,7 @@ public: void ReformatAllTextObjects(); - bool HasTransparentObjects( sal_bool bCheckForAlphaChannel = sal_False ) const; + bool HasTransparentObjects( bool bCheckForAlphaChannel = false ) const; SdrOutliner* createOutliner( sal_uInt16 nOutlinerMode ); void disposeOutliner( SdrOutliner* pOutliner ); diff --git a/svx/inc/svx/svdotable.hxx b/svx/inc/svx/svdotable.hxx index a40b7b353af9..24ee35224b76 100755 --- a/svx/inc/svx/svdotable.hxx +++ b/svx/inc/svx/svdotable.hxx @@ -203,7 +203,7 @@ public: // Gleichzeitig wird der Text in den Outliner gesetzt (ggf. // der des EditOutliners) und die PaperSize gesetzt. virtual void TakeTextRect( const sdr::table::CellPos& rPos, SdrOutliner& rOutliner, ::Rectangle& rTextRect, bool bNoEditText = false, ::Rectangle* pAnchorRect=NULL, bool bLineWidth = true ) const; - virtual void TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText = false, Rectangle* pAnchorRect=NULL, sal_Bool bLineWidth = sal_True ) const; + virtual void TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText = false, Rectangle* pAnchorRect=NULL, bool bLineWidth = true ) const; virtual void TakeTextAnchorRect(const sdr::table::CellPos& rPos, ::Rectangle& rAnchorRect ) const; virtual void TakeTextAnchorRect(::Rectangle& rAnchorRect) const; diff --git a/svx/inc/svx/svdotext.hxx b/svx/inc/svx/svdotext.hxx index e1d1073771d7..4bf24bbd2700 100755 --- a/svx/inc/svx/svdotext.hxx +++ b/svx/inc/svx/svdotext.hxx @@ -257,7 +257,7 @@ protected: sal_Bool mbTextAnimationAllowed : 1; // flag for preventing recursive onEditOutlinerStatusEvent calls - BOOL mbInDownScale : 1; + sal_Bool mbInDownScale : 1; SdrOutliner& ImpGetDrawOutliner() const; diff --git a/svx/inc/svx/svdundo.hxx b/svx/inc/svx/svdundo.hxx index 07d1c3621123..a88540f7cb33 100755 --- a/svx/inc/svx/svdundo.hxx +++ b/svx/inc/svx/svdundo.hxx @@ -144,7 +144,7 @@ protected: protected: SdrUndoObj(SdrObject& rNewObj); - void ImpTakeDescriptionStr(USHORT nStrCacheID, String& rStr, bool bRepeat = false) const; + void ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, String& rStr, bool bRepeat = false) const; static void GetDescriptionStringForObject( const SdrObject& _rForObject, sal_uInt16 nStrCacheID, String& rStr, bool bRepeat = false ); @@ -631,7 +631,7 @@ protected: protected: SdrUndoPage(SdrPage& rNewPg); - void ImpTakeDescriptionStr(USHORT nStrCacheID, String& rStr, sal_uInt16 n=0, bool bRepeat = false) const; + void ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, String& rStr, sal_uInt16 n=0, bool bRepeat = false) const; }; //************************************************************ diff --git a/svx/source/dialog/dlgutil.cxx b/svx/source/dialog/dlgutil.cxx index 93c93e9ef586..8c06f09bc367 100755 --- a/svx/source/dialog/dlgutil.cxx +++ b/svx/source/dialog/dlgutil.cxx @@ -57,12 +57,12 @@ FieldUnit GetModuleFieldUnit( const SfxItemSet& rSet ) return eUnit; } -BOOL GetApplyCharUnit( const SfxItemSet& rSet ) +bool GetApplyCharUnit( const SfxItemSet& rSet ) { - BOOL bUseCharUnit = FALSE; + bool bUseCharUnit = false; const SfxPoolItem* pItem = NULL; - if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_APPLYCHARUNIT, FALSE, &pItem ) ) - bUseCharUnit = (BOOL)( (const SfxBoolItem*)pItem )->GetValue(); + if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_APPLYCHARUNIT, sal_False, &pItem ) ) + bUseCharUnit = ((const SfxBoolItem*)pItem )->GetValue(); else { // FIXME - this might be wrong, cf. the DEV300 changes in GetModuleFieldUnit() @@ -77,7 +77,7 @@ BOOL GetApplyCharUnit( const SfxItemSet& rSet ) { pItem = pModule->GetItem( SID_ATTR_APPLYCHARUNIT ); if ( pItem ) - bUseCharUnit = (BOOL)( (SfxBoolItem*)pItem )->GetValue(); + bUseCharUnit = ((SfxBoolItem*)pItem )->GetValue(); } else { diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx index e7dfd58f8037..6708f3b5cca0 100755 --- a/svx/source/dialog/fontwork.cxx +++ b/svx/source/dialog/fontwork.cxx @@ -1090,7 +1090,7 @@ void SvxFontWorkDialog::ApplyImageList() { ResMgr* _pMgr = &DIALOG_MGR(); - USHORT nBitmapResId = RID_SVXBMP_FONTWORK_FORM1; + sal_uInt16 nBitmapResId = RID_SVXBMP_FONTWORK_FORM1; sal_uInt16 nTextResId = RID_SVXSTR_FONTWORK_FORM1; bool bInit = aFormSet.GetItemCount() == 0; diff --git a/svx/source/dialog/hyprlink.cxx b/svx/source/dialog/hyprlink.cxx deleted file mode 100755 index dc7b438db0af..000000000000 --- a/svx/source/dialog/hyprlink.cxx +++ /dev/null @@ -1,999 +0,0 @@ -/************************************************************************* - * - * 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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svx.hxx" -#include <tools/urlobj.hxx> -#include <vcl/msgbox.hxx> -#include <unotools/configitem.hxx> -#include <unotools/cmdoptions.hxx> -#include <svtools/inetimg.hxx> -#include <svl/urlbmk.hxx> -#include <svl/eitem.hxx> -#include <svl/stritem.hxx> -#include <sfx2/viewfrm.hxx> -#include <sfx2/docfile.hxx> -#include <sfx2/imgmgr.hxx> -#include <sfx2/dispatch.hxx> -#include <svl/urihelper.hxx> -#include <sfx2/objsh.hxx> -#include <comphelper/processfactory.hxx> - -#include "svx/hlnkitem.hxx" -#include <svx/dialogs.hrc> -#include "hyprlink.hrc" -#include <svx/dialmgr.hxx> -#include "svx/hyprlink.hxx" -#include "hyprdlg.hxx" - -using namespace ::rtl; -using namespace ::com::sun::star; - -// ----------------------------------------------------------------------- - -class SearchDefaultConfigItem_Impl : public ::utl::ConfigItem -{ - OUString sDefaultEngine; -public: - SearchDefaultConfigItem_Impl(); - ~SearchDefaultConfigItem_Impl(); - - const OUString& GetDefaultSearchEngine(){ return sDefaultEngine;} - virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); - virtual void Commit(); -}; - -/*-- 11.11.2003 14:20:59--------------------------------------------------- - - -----------------------------------------------------------------------*/ -SearchDefaultConfigItem_Impl::SearchDefaultConfigItem_Impl() : - ConfigItem(OUString::createFromAscii("Inet/DefaultSearchEngine")) -{ - uno::Sequence<OUString> aNames(1); - aNames.getArray()[0] = OUString::createFromAscii("Name"); - uno::Sequence< uno::Any > aValues = GetProperties(aNames); - aValues.getConstArray()[0] >>= sDefaultEngine; -} -/*-- 11.11.2003 14:21:00--------------------------------------------------- - - -----------------------------------------------------------------------*/ -SearchDefaultConfigItem_Impl::~SearchDefaultConfigItem_Impl() -{ -} - -void SearchDefaultConfigItem_Impl::Notify( const com::sun::star::uno::Sequence< rtl::OUString >& ) -{ -} - -void SearchDefaultConfigItem_Impl::Commit() -{ -} - -/************************************************************************* -|* -|* Dialog zum Einf"ugen/"Andern eines Hyperlink -|* -\************************************************************************/ - -SvxHyperlinkDlg::SvxHyperlinkDlg( SfxBindings *_pBindings, Window* pParent) : - - ToolBox ( pParent, SVX_RES( RID_SVXDLG_HYPERLINK ) ), - SfxControllerItem ( SID_HYPERLINK_SETLINK, *_pBindings ), - - aForwarder ( SID_HYPERLINK_GETLINK, *this ), - aHyperlinkDlgForward( SID_HYPERLINK_DIALOG , *this), - - aNameCB ( this, SVX_RES( CB_NAME ) ), - aUrlFT ( this, SVX_RES( FT_URL ) ), - aUrlCB ( this, SVX_RES( CB_URL ) ), - aSearchConfig (sal_True), - sAddress ( SVX_RES( STR_ADDRESS ) ), - sExplorer ( SVX_RES( STR_EXPLORER ) ), - sSearchTitle ( SVX_RES( STR_BOOKMARK_SEARCH ) ), - aLinkPopup ( SVX_RES( RID_SVXMN_HYPERLINK ) ), - pTargetMenu ( NULL ), - - bNoDoc ( sal_True ), - bSend ( sal_False ), - bHasOldName ( sal_False ), - bHtmlMode ( sal_False ) - -{ - FreeResource(); - - mpManager = SfxImageManager::GetImageManager( 0 ); - mpManager->RegisterToolBox( this ); - - SetImages(); - - // save initial size - nMaxWidth = GetSizePixel().Width(); - nMaxHeight = GetSizePixel().Height(); - - - InsertSeparator( 0 ); - InsertWindow( CB_URL, &aUrlCB, 0, 0 ); - // we need an item text for accessibility - String sItemText = aUrlCB.GetText(); - if ( sItemText.Len() == 0 ) - sItemText = aUrlCB.GetQuickHelpText(); - if ( sItemText.Len() > 0 ) - { - SetItemText( CB_URL, sItemText ); - sItemText.Erase(); - } - InsertWindow( FT_URL, &aUrlFT, 0, 0 ); - InsertSeparator( 0 ); - InsertWindow( CB_NAME, &aNameCB, 0, 0 ); - sItemText = aNameCB.GetText(); - if ( sItemText.Len() == 0 ) - sItemText = aNameCB.GetQuickHelpText(); - if ( sItemText.Len() > 0 ) - SetItemText( CB_NAME, sItemText ); - - SetSizePixel(CalcWindowSizePixel()); // Groesse initialisieren - - nMaxHeight = GetSizePixel().Height(); // Hoehe nochmal merken, da sie veraendert wurde - // SetSizePixel ruft Resize-Handler! - - Show(); - Resize(); - - long nUrlWidth = aUrlCB.GetResizeWidth(); - long nNameWidth = aNameCB.GetResizeWidth(); - long nSum = nUrlWidth + nNameWidth; - - aUrlCB.SetRatio((nUrlWidth * 100L) / nSum); - aNameCB.SetRatio((nNameWidth * 100L) / nSum); - - SetClickHdl( LINK( this, SvxHyperlinkDlg, TBClickHdl ) ); - SetSelectHdl( LINK( this, SvxHyperlinkDlg, TBSelectHdl ) ); - SetDropdownClickHdl( LINK( this, SvxHyperlinkDlg, DropdownClick ) ); - - SetItemBits( BTN_TARGET, GetItemBits( BTN_TARGET ) | TIB_DROPDOWNONLY ); - SetItemBits( BTN_INET_SEARCH, GetItemBits( BTN_INET_SEARCH ) | TIB_DROPDOWN ); - SetItemBits( BTN_INET_SEARCH, GetItemBits( BTN_TARGET ) | TIB_DROPDOWNONLY ); - - aLinkPopup.SetSelectHdl(LINK(this, SvxHyperlinkDlg, LinkPopupSelectHdl)); - - Link aLk = LINK(this, SvxHyperlinkDlg, ComboSelectHdl); - aNameCB.SetSelectHdl(aLk); - aUrlCB.SetSelectHdl(aLk); - - aLk = LINK(this, SvxHyperlinkDlg, ComboModifyHdl); - aNameCB.SetModifyHdl(aLk); - aUrlCB.SetModifyHdl(aLk); - - // Accessibility: Set the quick help text as accessible name for the - // drop down lists. - aNameCB.SetAccessibleName (aNameCB.GetQuickHelpText()); - aUrlCB.SetAccessibleName (aUrlCB.GetQuickHelpText()); - - // Hide button according to config item. - SvtCommandOptions aCmdOpts; - if ( aCmdOpts.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "InternetSearch" ) ) ) ) - HideItem( BTN_INET_SEARCH ); -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - -SvxHyperlinkDlg::~SvxHyperlinkDlg() -{ - SfxImageManager::GetImageManager( 0 )->ReleaseToolBox(this); - - if (pTargetMenu != NULL) - delete pTargetMenu; -} - -/*-------------------------------------------------------------------- - Beschreibung: Leiste so resizen, dass die Comboboxen automatisch mit - verkleinert werden - --------------------------------------------------------------------*/ - -void SvxHyperlinkDlg::Resize() -{ - long nWidth = GetSizePixel().Width(); - - ToolBox::Resize(); - - if (nWidth) // nWidth ist manchmal 0 - { - long nDeltaW = nMaxWidth - nWidth + aUrlCB.LogicToPixel(Size(3, 1)).Width() + 1; - - long nNewUrlWidth = aUrlCB.CalcResizeWidth(nDeltaW); - long nNewNameWidth = aNameCB.CalcResizeWidth(nDeltaW); - - if (nNewUrlWidth && nNewNameWidth) // Flackern reduzieren - { - SetUpdateMode(sal_False); - - // Comboboxen resizen - aUrlCB.DoResize(nNewUrlWidth); - aNameCB.DoResize(nNewNameWidth); - RecalcItems(); // Alle Elemente neu anordnen - - SetUpdateMode(sal_True); - } - } -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - -void SvxHyperlinkDlg::Resizing(Size& rSize) -{ - if (rSize.Height() > nMaxHeight) - rSize.Height() = nMaxHeight; - - if (rSize.Width() > nMaxWidth) - rSize.Width() = nMaxWidth; - - ToolBox::Resizing(rSize); -} - -/*-------------------------------------------------------------------- - Beschreibung: Im Dokument selektierten Hyperlink in Leiste anzeigen - --------------------------------------------------------------------*/ - -void SvxHyperlinkDlg::StateChanged( sal_uInt16 nSID, SfxItemState eState, - const SfxPoolItem* pState ) -{ - if ( nSID == SID_HYPERLINK_DIALOG ) - { - if( eState != SFX_ITEM_DISABLED) - { - EnableItem( BTN_OPENDIALOG, sal_True ); - - sal_Bool bItem = sal_False; - if ( pState && eState == SFX_ITEM_AVAILABLE ) - bItem = ((SfxBoolItem*)pState)->GetValue(); - SetItemState ( BTN_OPENDIALOG, bItem ? STATE_CHECK : STATE_NOCHECK ); - } - else - { - SetItemState ( BTN_OPENDIALOG, STATE_NOCHECK ); - EnableItem( BTN_OPENDIALOG, sal_False ); - } - } - - if (nSID == SID_HYPERLINK_SETLINK) - { - if (eState == SFX_ITEM_DISABLED) - bNoDoc = sal_True; - else - bNoDoc = sal_False; - EnableItem(BTN_TARGET, !bNoDoc); - EnableLink(); - } - - if (nSID == SID_HYPERLINK_GETLINK) - { - if (eState == SFX_ITEM_AVAILABLE) - { - const SvxHyperlinkItem& rHLnkItem = *((const SvxHyperlinkItem*)pState); - - sal_uInt16 nNamePos = aNameCB.GetEntryPos(aNameCB.GetText()); - sal_uInt16 nUrlPos = aUrlCB.GetEntryPos(aUrlCB.GetText()); - sal_uInt16 nNotFound = COMBOBOX_ENTRY_NOTFOUND; - - if (!bHasOldName && - (nNamePos == nNotFound || nUrlPos == nNotFound)) - { - sOldName = aNameCB.GetText(); - bHasOldName = sal_True; - } - if (rHLnkItem.GetName().Len()) - { - aNameCB.SetText(rHLnkItem.GetName()); - ComboModifyHdl(&aNameCB); - } - if (rHLnkItem.GetURL().Len() || rHLnkItem.GetName().Len()) - { - String sUrl = INetURLObject(rHLnkItem.GetURL()).GetURLNoPass(); - aUrlCB.SetText(sUrl); - } - else if (aUrlCB.GetEntryCount()) - { // Letzten Eintrag wieder selektieren - aNameCB.SetText(aNameCB.GetEntry(0)); - aUrlCB.SetText(aUrlCB.GetEntry(0)); - } - - TargetMenu(rHLnkItem.GetTargetFrame(), sal_False); - bHtmlMode = (rHLnkItem.GetInsertMode() & HLINK_HTMLMODE) != 0; - } - else - return; - - ComboModifyHdl(&aUrlCB); - } -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - -IMPL_LINK( SvxHyperlinkDlg, TBClickHdl, ToolBox *, pBox ) -{ - switch (pBox->GetCurItemId()) - { - case BTN_LINK: - { - if (!bSend) // Link ins Dokument einfuegen - SendToApp(HLINK_DEFAULT); - } - break; - - case BTN_OPENDIALOG: - { - GetBindings().GetDispatcher()->Execute( SID_HYPERLINK_DIALOG ); - } - break; - } - - return sal_True; -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - -IMPL_LINK( SvxHyperlinkDlg, TBSelectHdl, ToolBox *, pBox ) -{ - switch (pBox->GetCurItemId()) - { - // Link als Bookmark im Explorer eintragen - // Soll erst im Loslassen der Maus gerufen werden, daher im Select-Hdl - case BTN_INSERT_BOOKMARK: - { - String sName = aNameCB.GetText(); - if ( !sName.Len() ) - sName = aUrlCB.GetText(); - - String aBase = GetBindings().GetDispatcher()->GetFrame()->GetObjectShell()->GetMedium()->GetBaseURL(); - SfxStringItem aName( SID_BOOKMARK_TITLE, sName ); - SfxStringItem aURL( SID_BOOKMARK_URL, - URIHelper::SmartRel2Abs( INetURLObject(aBase), aUrlCB.GetText(), URIHelper::GetMaybeFileHdl(), true, false, - INetURLObject::WAS_ENCODED, - INetURLObject::DECODE_UNAMBIGUOUS ) ); - GetBindings().GetDispatcher()->Execute( - SID_CREATELINK, SFX_CALLMODE_ASYNCHRON, &aName, &aURL, 0L ); - } - break; - } - - return sal_True; -} - -IMPL_LINK( SvxHyperlinkDlg, DropdownClick, ToolBox *, pBox ) -{ - switch (pBox->GetCurItemId()) - { - case BTN_LINK: - { - // Link-Popup anstossen - EndSelection(); // Vor dem Execute, damit Popup den Focus bekommt - aLinkPopup.EnableItem(MN_BUTTON, !bHtmlMode); - aLinkPopup.Execute( this, GetItemRect( BTN_LINK ), FLOATWIN_POPUPMODE_DOWN ); - } - break; - - case BTN_INET_SEARCH: - { - // Search-Engines per Popup auswaehlen - PopupMenu *pMenu = new PopupMenu; - pMenu->SetSelectHdl(LINK(this, SvxHyperlinkDlg, SearchPopupSelectHdl)); - SearchDefaultConfigItem_Impl aDefaultEngine; - String sDefault(aDefaultEngine.GetDefaultSearchEngine()); - sDefault.ToLowerAscii(); - const bool bHasDefault = sDefault.Len() > 0; - - sal_uInt16 nCount = aSearchConfig.Count(); - String sFound; - for (sal_uInt16 i = 0; i < nCount; i++) - { - const SvxSearchEngineData& rData = aSearchConfig.GetData(i); - //check if it's the configured default search engine - String sTest(rData.sEngineName); - sTest.ToLowerAscii(); - bool bIsDefaultEngine = bHasDefault && STRING_NOTFOUND != sTest.Search( sDefault ); - //then put it at the top - if(i && bIsDefaultEngine) - { - pMenu->InsertItem( i + 1, rData.sEngineName, 0, 0); - pMenu->InsertSeparator(1); - } - else - { - if (i) - pMenu->InsertSeparator(); - pMenu->InsertItem( i + 1, rData.sEngineName); - } - } - pBox->SetItemDown(BTN_INET_SEARCH, sal_True, sal_True); - pMenu->Execute( this, GetItemRect( BTN_INET_SEARCH ), FLOATWIN_POPUPMODE_DOWN ); - pBox->SetItemDown(BTN_INET_SEARCH, sal_False, sal_True); - EndSelection(); - delete pMenu; - } - break; - - case BTN_TARGET: - { - // Target Frame einstellen - TargetMenu(GetSelTarget(), sal_True); - EndSelection(); - } - break; - } - - return sal_True; -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - -void SvxHyperlinkDlg::TargetMenu(const String& rSelEntry, sal_Bool bExecute) -{ - if (pTargetMenu && !bExecute) - { - for (sal_uInt16 i = 1; i <= pTargetMenu->GetItemCount(); i++) - { - if (pTargetMenu->GetItemText(i) == rSelEntry) - { - pTargetMenu->CheckItem(i); - return; - } - } - } - - SfxViewFrame* pVwFrm = SfxViewFrame::Current(); - - if (pVwFrm) // Alle moeglichen Target Frames zusammensammeln und anzeigen - { - TargetList aList; - pVwFrm->GetTopFrame().GetTargetList(aList); - - sal_uInt16 nCount = (sal_uInt16)aList.Count(); - if( nCount ) - { - sal_Bool bChecked = sal_False; - - if (pTargetMenu != NULL) - delete pTargetMenu; - - pTargetMenu = new PopupMenu; - pTargetMenu->SetMenuFlags( pTargetMenu->GetMenuFlags() | - MENU_FLAG_NOAUTOMNEMONICS ); - sal_uInt16 i; - for ( i = 0; i < nCount; i++ ) - { - String sEntry(*aList.GetObject(i)); - pTargetMenu->InsertItem(i + 1, sEntry, MIB_RADIOCHECK|MIB_AUTOCHECK); - - if (sEntry == rSelEntry) - { - pTargetMenu->CheckItem(i + 1); - bChecked = sal_True; - } - } - for ( i = nCount; i; i-- ) - delete aList.GetObject( i - 1 ); - - if (!bChecked) - pTargetMenu->CheckItem(1); - - if (bExecute) - { - sal_uInt16 nEntry = pTargetMenu->Execute( - this, GetItemRect( BTN_TARGET ), FLOATWIN_POPUPMODE_DOWN ); - if ( nEntry ) - pTargetMenu->CheckItem( nEntry ); - } - } - } -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - -IMPL_LINK( SvxHyperlinkDlg, LinkPopupSelectHdl, Menu *, pMenu ) -{ - switch (pMenu->GetCurItemId()) - { - case MN_FIELD: // URL als Hyperlink ins Dok einfuegen - SendToApp(HLINK_FIELD); - break; - case MN_BUTTON: // URL als Button ins Dok einfuegen - SendToApp(HLINK_BUTTON); - break; - } - - return sal_True; -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - -IMPL_LINK( SvxHyperlinkDlg, SearchPopupSelectHdl, Menu *, pMenu ) -{ - const SvxSearchEngineData& rData = aSearchConfig.GetData(pMenu->GetCurItemId() - 1); - String sText(aNameCB.GetText()); - sText.EraseLeadingChars().EraseTrailingChars(); - - rtl::OUString sPrefix; - rtl::OUString sSuffix; - rtl::OUString sSeparator; - sal_Int32 nCaseMatch; - sal_Unicode cToken = 0; - - if (sText.Search(' ') != STRING_NOTFOUND) - { - sPrefix = rData.sExactPrefix; - sSuffix = rData.sExactSuffix; - sSeparator = rData.sExactSeparator; - nCaseMatch = rData.nExactCaseMatch; - cToken = ' '; - } - else if (sText.Search('+') != STRING_NOTFOUND) - { - sPrefix = rData.sAndPrefix; - sSuffix = rData.sAndSuffix; - sSeparator = rData.sAndSeparator; - nCaseMatch = rData.nAndCaseMatch; - cToken = '+'; - } - else if (sText.Search(',') != STRING_NOTFOUND) - { - sPrefix = rData.sOrPrefix; - sSuffix = rData.sOrSuffix; - sSeparator = rData.sOrSeparator; - nCaseMatch = rData.nOrCaseMatch; - cToken = ','; - } - else - { - sPrefix = rData.sExactPrefix; - sSuffix = rData.sExactSuffix; - nCaseMatch = rData.nExactCaseMatch; - cToken = 0; - } - - String sURL = sPrefix; - xub_StrLen nTok; - - if(1 == nCaseMatch) - sText.ToUpperAscii(); - else if(2 == nCaseMatch) - sText.ToLowerAscii(); - - if ((nTok = sText.GetTokenCount(cToken)) > 1) - { - for (sal_uInt16 i = 0; i < nTok; i++) - { - sURL += sText.GetToken(i, cToken); - if(i < nTok -1) - sURL += (String)sSeparator; - } - sURL += (String)sSuffix; - } - else - { - sURL += sText; - sURL += (String)sSuffix; - } - sURL.EraseAllChars(); // remove all spaces - SfxViewFrame* pViewFrame = SfxViewFrame::Current(); - if ( pViewFrame ) - pViewFrame = pViewFrame->GetTopViewFrame(); - OpenDoc( sURL, pViewFrame ); - - return sal_True; -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - -IMPL_LINK( SvxHyperlinkDlg, BookmarkFoundHdl, String *, pUrl ) -{ - if (pUrl && pUrl->Len()) - { - aUrlCB.SetText(*pUrl); - ComboModifyHdl(&aUrlCB); - } - - return sal_True; -} -/*-------------------------------------------------------------------- - Beschreibung: Link-Button enablen/disablen - --------------------------------------------------------------------*/ - -void SvxHyperlinkDlg::EnableLink() -{ - sal_Bool bEnable = aUrlCB.GetText().Len() != 0; - - EnableItem(BTN_LINK, (!bNoDoc) & bEnable); -} - -/*-------------------------------------------------------------------- - Beschreibung: URL im Dokument einfuegen - --------------------------------------------------------------------*/ - -void SvxHyperlinkDlg::SendToApp(sal_uInt16 nType) -{ - sal_Bool bIsFile = sal_False; - bSend = sal_True; - String sURL( aUrlCB.GetText() ); - - if ( !sURL.Len() ) - return; - - String aBase = GetBindings().GetDispatcher()->GetFrame()->GetObjectShell()->GetMedium()->GetBaseURL(); - INetURLObject aObj( URIHelper::SmartRel2Abs( INetURLObject(aBase), sURL, URIHelper::GetMaybeFileHdl(), true, false, - INetURLObject::WAS_ENCODED, - INetURLObject::DECODE_UNAMBIGUOUS ) ); - sURL = aObj.GetMainURL( INetURLObject::NO_DECODE ); - if ( aObj.GetProtocol() == INET_PROT_FILE ) - bIsFile = sal_True; - - if ( bIsFile ) - { - EnterWait(); - SfxMedium aMedium( sURL, STREAM_STD_READ, sal_True ); - if ( aMedium.Exists( sal_False ) == sal_False ) - { - LeaveWait(); - QueryBox aBox( this, SVX_RES( RID_SVXQB_DONTEXIST ) ); - if ( aBox.Execute() == RET_NO ) - return; - } - else - LeaveWait(); - } - - SvxHyperlinkItem aItem( SID_HYPERLINK_SETLINK ); - - if (aNameCB.GetText().Len()) - aItem.SetName( aNameCB.GetText() ); - else - aItem.SetName( sURL ); - - sOldName = aNameCB.GetText(); - - aItem.SetURL(sURL); - aItem.SetInsertMode( (SvxLinkInsertMode)nType ); - aItem.SetTargetFrame( GetSelTarget() ); - - GetBindings().GetDispatcher()->Execute( - SID_HYPERLINK_SETLINK, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L ); - - AddToHistory( aNameCB.GetText(), sURL ); - - if ( sURL != aUrlCB.GetText() ) - aUrlCB.SetText( sURL ); -} - -/*-------------------------------------------------------------------- - Beschreibung: Selektierten Target Frame Eintrag im Popup ermitteln - --------------------------------------------------------------------*/ - -String SvxHyperlinkDlg::GetSelTarget() -{ - String sTarget; - - if (pTargetMenu != NULL) - { - for (sal_uInt16 i = 1; i <= pTargetMenu->GetItemCount(); i++) - { - if (pTargetMenu->IsItemChecked(i)) - { - sTarget = pTargetMenu->GetItemText(i); - break; - } - } - } - - return sTarget; -} - -/*-------------------------------------------------------------------- - Beschreibung: URL in History der Leiste aufnehmen - --------------------------------------------------------------------*/ - -void SvxHyperlinkDlg::AddToHistory(const String& rName, const String& rURL) -{ - String sName(rName); - - if (bHasOldName && sOldName.Len()) - { - sName = sOldName; - bHasOldName = sal_False; - } - - if (!sName.Len()) - sName = rURL; - - if (rURL.Len()) - { - sal_uInt16 nNamePos = aNameCB.GetEntryPos(sName); - sal_uInt16 nUrlPos = aUrlCB.GetEntryPos(rURL); - sal_uInt16 nPos = COMBOBOX_ENTRY_NOTFOUND; - - if (nNamePos != COMBOBOX_ENTRY_NOTFOUND) - nPos = nNamePos; - else - nPos = nUrlPos; - - // Alten Eintrag durch neuen Eintrag ersetzen - if (nPos != COMBOBOX_ENTRY_NOTFOUND) - { - aNameCB.RemoveEntry(nPos); - aUrlCB.RemoveEntry(nPos); - aNameCB.SetText(rName); - aUrlCB.SetText(rURL); - } - - aNameCB.InsertEntry(sName, 0); - aUrlCB.InsertEntry(rURL, 0); - } -} - -/*-------------------------------------------------------------------- - Beschreibung: Bookmark und Search-Button enablen/disablen - --------------------------------------------------------------------*/ - -IMPL_LINK( SvxHyperlinkDlg, ComboSelectHdl, ComboBox *, pCombo ) -{ - sal_uInt16 nPos = pCombo->GetEntryPos(pCombo->GetText()); - - if (nPos != COMBOBOX_ENTRY_NOTFOUND) - { - aNameCB.SetText(aNameCB.GetEntry(nPos)); - aUrlCB.SetText(aUrlCB.GetEntry(nPos)); - - EnableLink(); - EnableItem(BTN_INSERT_BOOKMARK, sal_True); - EnableItem(BTN_INET_SEARCH, sal_True); - } - return sal_True; -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - -IMPL_LINK( SvxHyperlinkDlg, ComboModifyHdl, ComboBox *, pCombo ) -{ - sal_Bool bEnable = sal_True; - - if (!pCombo->GetText().Len()) - bEnable = sal_False; - - if (pCombo == &aNameCB) - { - if (IsItemEnabled(BTN_INET_SEARCH) != bEnable) - EnableItem(BTN_INET_SEARCH, bEnable); - } - - EnableLink(); - - if (aUrlCB.GetText().Len()) - bEnable = sal_True; - else - bEnable = sal_False; - - if (IsItemEnabled(BTN_INSERT_BOOKMARK) != bEnable) - EnableItem(BTN_INSERT_BOOKMARK, bEnable); - - return sal_True; -} - -// -------------------------------------------------------------------- - -void SvxHyperlinkDlg::DataChanged( const DataChangedEvent& rDCEvt ) -{ - ToolBox::DataChanged( rDCEvt ); - - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) - SetImages(); -} - -// -------------------------------------------------------------------- - -void SvxHyperlinkDlg::SetImages() -{ - bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - - SetItemImage( BTN_LINK, mpManager->GetImage( BTN_LINK, bHighContrast ) ); - SetItemImage( BTN_INSERT_BOOKMARK, mpManager->GetImage( BTN_INSERT_BOOKMARK, bHighContrast ) ); - SetItemImage( BTN_INET_SEARCH, mpManager->GetImage( BTN_INET_SEARCH, bHighContrast ) ); - SetItemImage( BTN_TARGET, mpManager->GetImage( BTN_TARGET, bHighContrast ) ); - SetItemImage( BTN_OPENDIALOG, mpManager->GetImage( BTN_OPENDIALOG, bHighContrast ) ); -} - -/*-------------------------------------------------------------------- - Beschreibung: Comboboxen - --------------------------------------------------------------------*/ - -HyperCombo::HyperCombo( SvxHyperlinkDlg* pDialog, const ResId& rResId ) : - ComboBox( (Window *)pDialog, rResId ) -{ - pDlg = pDialog; - - nMaxWidth = GetSizePixel().Width(); - if (this == &pDlg->aUrlCB) - nMinWidth = GetTextWidth(String::CreateFromAscii("http://www.stardiv.dewww")); - else - nMinWidth = GetTextWidth(String::CreateFromAscii("StarDivision GmbHwww")); -} - -/*-------------------------------------------------------------------- - Beschreibung: Comboboxen KeyInput - --------------------------------------------------------------------*/ - -long HyperCombo::Notify( NotifyEvent& rNEvt ) -{ - long nHandled = 0; - static sal_Bool bLocked = sal_False; - - if (bLocked) // Keine weiteren RETURNs annehmen (nicht Reentrant!) - return nHandled; - - bLocked = sal_True; - - if ( rNEvt.GetType() == EVENT_KEYINPUT ) - { - const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); - const KeyCode aKeyCode = pKEvt->GetKeyCode(); - - if (aKeyCode.GetCode() == KEY_RETURN) - { - pDlg->SendToApp(HLINK_DEFAULT); - nHandled = 1; - } - } - if (this == &pDlg->aNameCB) - pDlg->sOldName = GetText(); - - if (!nHandled) - nHandled = ComboBox::Notify( rNEvt ); - - bLocked = sal_False; - - return nHandled; -} - -/*-------------------------------------------------------------------- - Beschreibung: Drag&Drop vor dem Combo-Edit abfangen und weiterleiten - --------------------------------------------------------------------*/ - -long HyperCombo::PreNotify( NotifyEvent& rNEvt ) -{ - long nHandled = 0; - - nHandled = ComboBox::PreNotify( rNEvt ); - - return nHandled; -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - -long HyperCombo::CalcResizeWidth( long nW ) -{ - long nNewWidth = Max(nMaxWidth - nW * GetRatio() / 100L, nMinWidth); - - if (nNewWidth > nMaxWidth) - nNewWidth = nMaxWidth; - - if (nNewWidth != GetSizePixel().Width()) - return nNewWidth; - else - return 0; // Kein Resize notwendig -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - -void HyperCombo::DoResize( long nNewWidth ) -{ - SetSizePixel(Size(nNewWidth, GetSizePixel().Height())); -} - -/*-------------------------------------------------------------------- - Beschreibung: FixedText - --------------------------------------------------------------------*/ - -HyperFixedText::HyperFixedText( SvxHyperlinkDlg* pDialog, const ResId& rResId ) : - FixedInfo( (Window *)pDialog, rResId ) -{ - pDlg = pDialog; -} - -/*-------------------------------------------------------------------- - Beschreibung: Webseite der Search-Engine mit Suchergebnissen anzeigen - --------------------------------------------------------------------*/ -void SvxHyperlinkDlg::OpenDoc( const String& rURL, SfxViewFrame* pViewFrame ) -{ - SfxStringItem aName( SID_FILE_NAME, rURL ); - SfxStringItem aReferer( SID_REFERER, String::CreateFromAscii("private:user") ); - SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, sal_True ); - SfxBoolItem aSilent( SID_SILENT, sal_True ); - SfxBoolItem aReadOnly( SID_DOC_READONLY, sal_True ); - SfxBoolItem aExternal( SID_BROWSE, sal_True ); - SfxDispatcher* pDisp = SfxViewFrame::Current() ? SfxViewFrame::Current()->GetDispatcher() : NULL; - - if ( pViewFrame ) - { - SfxFrameItem aView( SID_DOCFRAME, pViewFrame ? &pViewFrame->GetFrame() : NULL ); - if ( pDisp ) - pDisp->Execute( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, - &aName, &aView, &aNewView, &aSilent, &aReadOnly, &aReferer, &aExternal, 0L ); - } - else if ( pDisp ) - pDisp->Execute( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, - &aName, &aNewView, &aSilent, &aReadOnly, &aReferer, 0L ); -} -// class SvxHyperlinkDialogWrapper ------------------------------------------ - -SFX_IMPL_CHILDWINDOW(SvxHyperlinkDlgWrapper, SID_HYPERLINK_INSERT) - -/*-------------------------------------------------------------------- - Beschreibung: Wrapper fuer Hyperlinkleiste - --------------------------------------------------------------------*/ - -SvxHyperlinkDlgWrapper::SvxHyperlinkDlgWrapper( Window* _pParent, sal_uInt16 nId, - SfxBindings* _pBindings, SfxChildWinInfo* /*pInfo*/ ) : - - SfxChildWindow( _pParent, nId ) - -{ - pWindow = new SvxHyperlinkDlg( _pBindings, _pParent ); - eChildAlignment = SFX_ALIGN_TOP; -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - -SfxChildWinInfo SvxHyperlinkDlgWrapper::GetInfo() const -{ - SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); - return aInfo; -} - diff --git a/svx/source/dialog/hyprlink.src b/svx/source/dialog/hyprlink.src deleted file mode 100755 index c59a2f8eb52a..000000000000 --- a/svx/source/dialog/hyprlink.src +++ /dev/null @@ -1,167 +0,0 @@ -/************************************************************************* - * - * 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 ------------------------------------------------------------------ -#include <svx/dialogs.hrc> -#include "hyprlink.hrc" -#include "helpid.hrc" -#include <svx/svxids.hrc> - - // pragma ------------------------------------------------------------------- - - // RID_SVXDLG_HYPERLINK ------------------------------------------------------ -ToolBox RID_SVXDLG_HYPERLINK -{ - OutputSize = TRUE ; - Hide = TRUE; - - // Dockable = TRUE ; - // Closeable = TRUE ; - // Moveable = TRUE ; - // Sizeable = TRUE ; - // EnableResizing = TRUE ; - - SVLook = TRUE ; - Border = TRUE ; - Size = MAP_APPFONT ( 410 , 17 ) ; - Scroll = TRUE ; - HelpID = HID_OFA_HYPERLINK_DLG ; - - Text [ en-US ] = "Insert Hyperlink" ; - - ComboBox CB_NAME - { - HelpID = HID_OFA_HYPERLINK_NAME ; - Pos = MAP_APPFONT ( 2 , 3 ) ; - Size = MAP_APPFONT ( 100 , 60 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - AutoSize = TRUE ; - AutoHScroll = TRUE ; - DDExtraWidth = TRUE ; - QuickHelpText [ en-US ] = "URL Name" ; - }; - FixedText FT_URL - { - HelpID = HID_OFA_HYPERLINK_URL_TXT ; - Pos = MAP_APPFONT ( 105 , 5 ) ; - Size = MAP_APPFONT ( 16 , 10 ) ; - Text [ en-US ] = "URL:" ; - }; - ComboBox CB_URL - { - HelpID = HID_OFA_HYPERLINK_URL ; - Pos = MAP_APPFONT ( 121 , 3 ) ; - Size = MAP_APPFONT ( 204 , 60 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - AutoSize = TRUE ; - AutoHScroll = TRUE ; - DDExtraWidth = TRUE ; - QuickHelpText [ en-US ] = "Internet URLs" ; - }; - ItemList = - { - ToolBoxItem - { - HelpID = HID_OFA_HYPERLINK_TARGET ; - Identifier = BTN_TARGET ; - DropDown = TRUE ; - Text [ en-US ] = "Target Frame" ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - HelpID = CMD_SID_HYPERLINK_SETLINK ; - Identifier = BTN_LINK ; - Disable = TRUE ; - DropDown = TRUE ; - Text [ en-US ] = "Hyperlink" ; - }; - ToolBoxItem - { - HelpID = CMD_SID_CREATELINK ; - Identifier = BTN_INSERT_BOOKMARK ; - Disable = TRUE ; - Hide = TRUE; - Text [ en-US ] = "Link" ; - }; - ToolBoxItem - { - HelpID = HID_OFA_HYPERLINK_SEARCH ; - Identifier = BTN_INET_SEARCH ; - Disable = TRUE ; - DropDown = TRUE ; - Text [ en-US ] = "Find" ; - }; - }; - String STR_ADDRESS - { - Text [ en-US ] = "Address Book" ; - }; - String STR_EXPLORER - { - Text [ en-US ] = "Bookmark folder" ; - }; - String STR_BOOKMARK_SEARCH - { - Text [ en-US ] = "Search in bookmarks"; - }; -}; - // PopupMenu ------------------------------------------------------------- -Menu RID_SVXMN_HYPERLINK -{ - ItemList = - { - MenuItem - { - Identifier = MN_FIELD ; - Text [ en-US ] = "As Text" ; - }; - MenuItem - { - Identifier = MN_BUTTON ; - Text [ en-US ] = "As Button" ; - }; - }; -}; -QueryBox RID_SVXQB_DONTEXIST -{ - BUTTONS = WB_YES_NO ; - DEFBUTTON = WB_DEF_YES ; - Message [ en-US ] = "This URL does not exist.\nInsert anyway?" ; -}; - - - - - - - - diff --git a/svx/source/dialog/rulritem.cxx b/svx/source/dialog/rulritem.cxx index 1826c8795738..091b715aee89 100755 --- a/svx/source/dialog/rulritem.cxx +++ b/svx/source/dialog/rulritem.cxx @@ -728,7 +728,7 @@ bool SvxObjectItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMembe bool SvxObjectItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) { nMemberId &= ~CONVERT_TWIPS; - BOOL bRet = false; + bool bRet = false; switch ( nMemberId ) { case MID_START_X : bRet = (rVal >>= nStartX); break; diff --git a/svx/source/engine3d/svx3ditems.cxx b/svx/source/engine3d/svx3ditems.cxx index 8ba64b7afbd2..78095748995a 100755 --- a/svx/source/engine3d/svx3ditems.cxx +++ b/svx/source/engine3d/svx3ditems.cxx @@ -399,13 +399,13 @@ SfxPoolItem* Svx3DCloseBackItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) ////////////////////////////////////////////////////////////////////////////// // Svx3DNormalsKindItem: use drawing::NormalsKind -sal_Bool Svx3DNormalsKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const +bool Svx3DNormalsKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const { rVal <<= (drawing::NormalsKind)GetValue(); return true; } -sal_Bool Svx3DNormalsKindItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/) +bool Svx3DNormalsKindItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/) { drawing::NormalsKind eVar; if(!(rVal >>= eVar)) @@ -420,13 +420,13 @@ SfxPoolItem* Svx3DNormalsKindItem::Clone(SfxItemPool* /*pPool*/) const } // Svx3DTextureProjectionXItem: use drawing::TextureProjectionMode -sal_Bool Svx3DTextureProjectionXItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const +bool Svx3DTextureProjectionXItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const { rVal <<= (drawing::TextureProjectionMode)GetValue(); return true; } -sal_Bool Svx3DTextureProjectionXItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/) +bool Svx3DTextureProjectionXItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/) { drawing::TextureProjectionMode eVar; if(!(rVal >>= eVar)) @@ -441,13 +441,13 @@ SfxPoolItem* Svx3DTextureProjectionXItem::Clone(SfxItemPool* /*pPool*/) const } // Svx3DTextureProjectionYItem: use drawing::TextureProjectionMode -sal_Bool Svx3DTextureProjectionYItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const +bool Svx3DTextureProjectionYItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const { rVal <<= (drawing::TextureProjectionMode)GetValue(); return true; } -sal_Bool Svx3DTextureProjectionYItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/) +bool Svx3DTextureProjectionYItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/) { drawing::TextureProjectionMode eVar; if(!(rVal >>= eVar)) @@ -462,13 +462,13 @@ SfxPoolItem* Svx3DTextureProjectionYItem::Clone(SfxItemPool* /*pPool*/) const } // Svx3DTextureKindItem: use drawing::TextureKind -sal_Bool Svx3DTextureKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const +bool Svx3DTextureKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const { rVal <<= (drawing::TextureKind)GetValue(); return true; } -sal_Bool Svx3DTextureKindItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/) +bool Svx3DTextureKindItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/) { drawing::TextureKind eVar; if(!(rVal >>= eVar)) @@ -483,13 +483,13 @@ SfxPoolItem* Svx3DTextureKindItem::Clone(SfxItemPool* /*pPool*/) const } // Svx3DTextureModeItem: use drawing:TextureMode -sal_Bool Svx3DTextureModeItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const +bool Svx3DTextureModeItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const { rVal <<= (drawing::TextureMode)GetValue(); return true; } -sal_Bool Svx3DTextureModeItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/) +bool Svx3DTextureModeItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/) { drawing::TextureMode eVar; if(!(rVal >>= eVar)) @@ -504,13 +504,13 @@ SfxPoolItem* Svx3DTextureModeItem::Clone(SfxItemPool* /*pPool*/) const } // Svx3DPerspectiveItem: use drawing::ProjectionMode -sal_Bool Svx3DPerspectiveItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const +bool Svx3DPerspectiveItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const { rVal <<= (drawing::ProjectionMode)GetValue(); return true; } -sal_Bool Svx3DPerspectiveItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/) +bool Svx3DPerspectiveItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/) { drawing::ProjectionMode eVar; if(!(rVal >>= eVar)) @@ -525,13 +525,13 @@ SfxPoolItem* Svx3DPerspectiveItem::Clone(SfxItemPool* /*pPool*/) const } // Svx3DShadeModeItem: use drawing::ShadeMode -sal_Bool Svx3DShadeModeItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const +bool Svx3DShadeModeItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const { rVal <<= (drawing::ShadeMode)GetValue(); return true; } -sal_Bool Svx3DShadeModeItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/) +bool Svx3DShadeModeItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/) { drawing::ShadeMode eVar; if(!(rVal >>= eVar)) diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 3ebffdc097e9..0eba3f66d248 100755 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -526,7 +526,7 @@ void Gallery::ImplWriteImportList() const sal_uInt32 nInventor = (sal_uInt32) COMPAT_FORMAT( 'S', 'G', 'A', '3' ); const sal_uInt16 nId = 0x0004; - *pOStm << nInventor << nId << (sal_uInt32) aImportList.Count() << (sal_uInt16) gsl_getSystemTextEncoding(); + *pOStm << nInventor << nId << (sal_uInt32) aImportList.size() << (sal_uInt16) gsl_getSystemTextEncoding(); for ( size_t i = 0, n = aImportList.size(); i < n; ++i ) *pOStm << *aImportList[ i ]; diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index d0576a152811..1cc55f3de55d 100755 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -426,7 +426,7 @@ void GalleryTheme::UnlockBroadcaster( sal_uIntPtr nUpdatePos ) // ------------------------------------------------------------------------ -sal_Bool GalleryTheme::InsertObject( const SgaObject& rObj, sal_uIntPtr nInsertPos ) +bool GalleryTheme::InsertObject( const SgaObject& rObj, sal_uIntPtr nInsertPos ) { sal_Bool bRet = sal_False; @@ -565,7 +565,7 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg // LoeschFlag zuruecksetzen for (size_t i = 0; i < nCount; i++) - aObjectList[ i ]->bDummy = sal_False + aObjectList[ i ]->bDummy = sal_False; for(size_t i = 0; ( i < nCount ) && !bAbortActualize; i++) { @@ -647,7 +647,7 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg ::std::advance( it, i ); aObjectList.erase( it ); delete pEntry; - Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< ULONG >( pEntry ) ) ); + Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uLong >( pEntry ) ) ); } else ++i; } diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx index b6d4454dab90..7e1b75c0d183 100755 --- a/svx/source/inc/fmshimp.hxx +++ b/svx/source/inc/fmshimp.hxx @@ -178,9 +178,9 @@ class SAL_DLLPRIVATE FmXFormShell :public FmXFormShell_BASE FmFormArray m_aSearchForms; struct InvalidSlotInfo { - USHORT id; - BYTE flags; - inline InvalidSlotInfo(USHORT slotId, BYTE flgs) : id(slotId), flags(flgs) {}; + sal_uInt16 id; + sal_uInt8 flags; + inline InvalidSlotInfo(sal_uInt16 slotId, sal_uInt8 flgs) : id(slotId), flags(flgs) {}; }; std::vector<InvalidSlotInfo> m_arrInvalidSlots; // we explicitly switch off the propbrw before leaving the design mode diff --git a/svx/source/intro/about_ooo.src b/svx/source/intro/about_ooo.src deleted file mode 100755 index b49a0ff927cf..000000000000 --- a/svx/source/intro/about_ooo.src +++ /dev/null @@ -1,40 +0,0 @@ -/************************************************************************* - * - * 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 <svtools/svtools.hrc> -#include "about_ooo.hrc" - -String ABOUT_STR_COPYRIGHT -{ - Text[ en-US ] = "Copyright © 2000, 2010 Oracle and/or its affiliates. All rights reserved.\nThis product was created by %OOOVENDOR, based on OpenOffice.org.\nOpenOffice.org acknowledges all community members, especially those mentioned at\n http://www.openoffice.org/welcome/credits.html."; -}; - -StringArray ABOUT_STR_DEVELOPER_ARY -{ - OOO_CONTRIBUTOR_LIST -}; - diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx index 337ce3140f25..8239aa8c4a5c 100755 --- a/svx/source/stbctrls/modctrl.cxx +++ b/svx/source/stbctrls/modctrl.cxx @@ -31,15 +31,13 @@ // include --------------------------------------------------------------- -#include "modctrl.hxx" - #include <vcl/status.hxx> #include <vcl/image.hxx> #include <svl/eitem.hxx> #include <sfx2/app.hxx> #include <svx/dialogs.hrc> -#include "svx/modctrl.hxx" +#include <svx/modctrl.hxx> #include <svx/dialmgr.hxx> #include <com/sun/star/beans/PropertyValue.hpp> diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index dcab84f3de01..1e38fb7167ca 100755 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -2215,7 +2215,7 @@ SfxPoolItem* SdrGrafInvertItem::Clone( SfxItemPool* /*pPool*/) const return new SdrGrafInvertItem( *this ); } -SfxPoolItem* SdrGrafInvertItem::Create( SvStream& rIn, USHORT /*nVer*/) const +SfxPoolItem* SdrGrafInvertItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrGrafInvertItem( rIn ); } diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index 4d002d1ba888..a27d1d1b4a4f 100755 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -828,7 +828,7 @@ void SdrEditView::DistributeMarkedObjects() SvxDistributeVertical eVer = pDlg->GetDistributeVer(); ImpDistributeEntryList aEntryList; ImpDistributeEntryList::iterator itEntryList; - UINT32 nFullLength; + sal_uInt32 nFullLength; const bool bUndo = IsUndoEnabled(); if( bUndo ) @@ -875,7 +875,8 @@ void SdrEditView::DistributeMarkedObjects() for ( itEntryList = aEntryList.begin(); itEntryList < aEntryList.end() && (*itEntryList)->mnPos < pNew->mnPos; - ++itEntryList ); + ++itEntryList ) + {}; if ( itEntryList < aEntryList.end() ) aEntryList.insert( itEntryList, pNew ); else @@ -969,7 +970,8 @@ void SdrEditView::DistributeMarkedObjects() for ( itEntryList = aEntryList.begin(); itEntryList < aEntryList.end() && (*itEntryList)->mnPos < pNew->mnPos; - ++itEntryList ); + ++itEntryList ) + {}; if ( itEntryList < aEntryList.end() ) aEntryList.insert( itEntryList, pNew ); else diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 6d93c2e771b3..0aa0febe0da4 100755 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -477,7 +477,7 @@ bool SdrModel::Undo() bool SdrModel::Redo() { - bool bRet=FALSE; + bool bRet = false; if( mpImpl->mpUndoManager ) { OSL_FAIL("svx::SdrModel::Redo(), method not supported with application undo manager!"); diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 96c93b38b0aa..1d8e36c9abfc 100755 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -72,7 +72,6 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <osl/thread.hxx> -#include <vos/mutex.hxx> using namespace ::com::sun::star::uno; using namespace ::com::sun::star::io; @@ -201,7 +200,7 @@ void SAL_CALL SdrGraphicUpdater::run(void) { Graphic aGraphic( ImpLoadLinkedGraphic( mrFileName, mrFilterName ) ); ::osl::MutexGuard aGuard(maMutex); - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if ( !mbIsTerminated ) { mrGraphicLink.DataChanged( aGraphic ); diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 3ae99e5dd63d..65db1d27db58 100755 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -1425,7 +1425,7 @@ bool ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) if (rStat.GetPointAnz()>=2) eCmd=SDRCREATE_FORCEEND; bRet = eCmd==SDRCREATE_FORCEEND; if (bRet) { - mbCreating = FALSE; + mbCreating = sal_False; delete pU; rStat.SetUser(NULL); } diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 0ea30bc54ad4..198beaecab93 100755 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1436,8 +1436,8 @@ void SdrTextObj::ImpAutoFitText( SdrOutliner& rOutliner, const Size& rTextSize, // line-breaking text that we need some more samples // loop early-exits if we detect an already attained value - USHORT nMinStretchX=0, nMinStretchY=0; - USHORT aOldStretchXVals[]={0,0,0,0,0,0,0,0,0,0}; + sal_uInt16 nMinStretchX=0, nMinStretchY=0; + sal_uInt16 aOldStretchXVals[]={0,0,0,0,0,0,0,0,0,0}; const size_t aStretchArySize=sizeof(aOldStretchXVals)/sizeof(*aOldStretchXVals); for(unsigned int i=0; i<aStretchArySize; ++i) { @@ -1448,7 +1448,7 @@ void SdrTextObj::ImpAutoFitText( SdrOutliner& rOutliner, const Size& rTextSize, else fFactor = double(rTextSize.Height())/aCurrTextSize.Height(); - USHORT nCurrStretchX, nCurrStretchY; + sal_uInt16 nCurrStretchX, nCurrStretchY; rOutliner.GetGlobalCharStretching(nCurrStretchX, nCurrStretchY); if (fFactor >= 1.0 ) @@ -1465,17 +1465,17 @@ void SdrTextObj::ImpAutoFitText( SdrOutliner& rOutliner, const Size& rTextSize, if (fFactor < 1.0 || (fFactor >= 1.0 && nCurrStretchX != 100)) { - nCurrStretchX = sal::static_int_cast<USHORT>(nCurrStretchX*fFactor); - nCurrStretchY = sal::static_int_cast<USHORT>(nCurrStretchY*fFactor); - rOutliner.SetGlobalCharStretching(std::min(USHORT(100),nCurrStretchX), - std::min(USHORT(100),nCurrStretchY)); + nCurrStretchX = sal::static_int_cast<sal_uInt16>(nCurrStretchX*fFactor); + nCurrStretchY = sal::static_int_cast<sal_uInt16>(nCurrStretchY*fFactor); + rOutliner.SetGlobalCharStretching(std::min(sal_uInt16(100),nCurrStretchX), + std::min(sal_uInt16(100),nCurrStretchY)); OSL_TRACE("SdrTextObj::onEditOutlinerStatusEvent(): zoom is %d", nCurrStretchX); } } OSL_TRACE("---- SdrTextObj::onEditOutlinerStatusEvent(): final zoom is %d ----", nMinStretchX); - rOutliner.SetGlobalCharStretching(std::min(USHORT(100),nMinStretchX), - std::min(USHORT(100),nMinStretchY)); + rOutliner.SetGlobalCharStretching(std::min(sal_uInt16(100),nMinStretchX), + std::min(sal_uInt16(100),nMinStretchY)); } void SdrTextObj::SetupOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaintRect ) const diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index e77265155642..a28ca620205f 100755 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -501,7 +501,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co Point aTemporaryTextRelativePosition(aLocalLogicPosition - aTextRect.TopLeft()); // FitToSize berueksichtigen - BOOL bFitToSize(pTextObj->IsFitToSize()); + bool bFitToSize(pTextObj->IsFitToSize()); if (bFitToSize) { Fraction aX(aTextRect.GetWidth()-1,aAnchor.GetWidth()-1); Fraction aY(aTextRect.GetHeight()-1,aAnchor.GetHeight()-1); diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index aebf5a64e298..f23f88718d65 100755 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -677,7 +677,7 @@ void ExtrusionLightingWindow::implSetDirection( int nDirection, bool bEnabled ) { mpLightingSet->SetItemImage( nItemId + 1, - (USHORT)nDirection == nItemId ? maImgLightingOn[nItemId] : maImgLightingOff[nItemId] + (sal_uInt16)nDirection == nItemId ? maImgLightingOn[nItemId] : maImgLightingOff[nItemId] ); } } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index eab87edc511a..cb25098087b5 100755 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2010,7 +2010,7 @@ void SvxStyleToolBoxControl::FillStyleBox() } else { - USHORT i= 0; + sal_uInt16 i= 0; while ( pStyle && !bDoFill ) { bDoFill = ( pBox->GetEntry(i) != pStyle->GetName() ); diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index 1f7efa15a496..fb6222e1bb32 100755 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -916,7 +916,7 @@ uno::Sequence< OUString > UHashMap::getServiceNames() return aSeq; } -UINT32 UHashMap::getId( const OUString& rCompareString ) +sal_uInt32 UHashMap::getId( const OUString& rCompareString ) { const UHashMapImpl &rMap = GetUHashImpl(); UHashMapImpl::const_iterator it = rMap.find( rCompareString ); |