diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-07-24 19:22:59 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-07-24 19:22:59 +0200 |
commit | 0ef7b7cec59c0082bccff882f5bf20214ff792a5 (patch) | |
tree | 5385dd21e86a182891ea0a3b3acf0179ab74cd39 /sfx2 | |
parent | eac26998ca7458314420efe9e0ae29cfa92dbf4b (diff) | |
parent | dbf2ca3d9c034866546f40c13c5b2c7020e35725 (diff) |
Merge branch 'master' into feature/gnumake4
Diffstat (limited to 'sfx2')
-rwxr-xr-x | sfx2/AllLangResTarget_sfx2.mk | 1 | ||||
-rwxr-xr-x | sfx2/Package_inc.mk | 1 | ||||
-rw-r--r-- | sfx2/inc/sfx2/docfile.hxx | 6 | ||||
-rw-r--r-- | sfx2/inc/sfx2/frmhtml.hxx | 2 | ||||
-rw-r--r-- | sfx2/inc/sfx2/progress.hxx | 2 | ||||
-rw-r--r-- | sfx2/inc/sfx2/sfxhtml.hxx | 9 | ||||
-rw-r--r-- | sfx2/inc/sfx2/templatelocnames.hrc | 81 | ||||
-rw-r--r-- | sfx2/source/bastyp/frmhtml.cxx | 32 | ||||
-rw-r--r-- | sfx2/source/bastyp/helper.cxx | 27 | ||||
-rw-r--r-- | sfx2/source/bastyp/progress.cxx | 24 | ||||
-rw-r--r-- | sfx2/source/bastyp/sfxhtml.cxx | 38 | ||||
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 34 | ||||
-rw-r--r-- | sfx2/source/doc/doctempl.cxx | 20 | ||||
-rw-r--r-- | sfx2/source/doc/new.cxx | 13 | ||||
-rw-r--r-- | sfx2/source/doc/objmisc.cxx | 27 | ||||
-rw-r--r-- | sfx2/source/doc/templatelocnames.src | 281 | ||||
-rw-r--r-- | sfx2/source/inc/helper.hxx | 1 | ||||
-rw-r--r-- | sfx2/source/inc/objshimp.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/inc/preview.hxx | 3 |
19 files changed, 422 insertions, 182 deletions
diff --git a/sfx2/AllLangResTarget_sfx2.mk b/sfx2/AllLangResTarget_sfx2.mk index 77691fe88025..665d53f6fe19 100755 --- a/sfx2/AllLangResTarget_sfx2.mk +++ b/sfx2/AllLangResTarget_sfx2.mk @@ -75,6 +75,7 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\ sfx2/source/doc/docvor.src \ sfx2/source/doc/graphhelp.src \ sfx2/source/doc/new.src \ + sfx2/source/doc/templatelocnames.src \ sfx2/source/menu/menu.src \ sfx2/source/view/view.src \ )) diff --git a/sfx2/Package_inc.mk b/sfx2/Package_inc.mk index 6ecf5f368d27..c68cb9613d68 100755 --- a/sfx2/Package_inc.mk +++ b/sfx2/Package_inc.mk @@ -128,6 +128,7 @@ $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tabdlg.hxx,sfx2/tabdlg.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/taskpane.hxx,sfx2/taskpane.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tbxctrl.hxx,sfx2/tbxctrl.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/templdlg.hxx,sfx2/templdlg.hxx)) +$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/templatelocnames.hrc,sfx2/templatelocnames.hrc)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/titledockwin.hxx,sfx2/titledockwin.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tplpitem.hxx,sfx2/tplpitem.hxx)) $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/unoctitm.hxx,sfx2/unoctitm.hxx)) diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx index 273fb3d3ef45..5435a01da858 100644 --- a/sfx2/inc/sfx2/docfile.hxx +++ b/sfx2/inc/sfx2/docfile.hxx @@ -246,7 +246,6 @@ public: SAL_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetInputStream_Impl(); SAL_DLLPRIVATE void CloseAndReleaseStreams_Impl(); - SAL_DLLPRIVATE void RefreshName_Impl(); SAL_DLLPRIVATE sal_uInt16 AddVersion_Impl( com::sun::star::util::RevisionTag& rVersion ); SAL_DLLPRIVATE sal_Bool TransferVersionList_Impl( SfxMedium& rMedium ); SAL_DLLPRIVATE sal_Bool SaveVersionList_Impl( sal_Bool bUseXML ); @@ -254,8 +253,6 @@ public: SAL_DLLPRIVATE void SetExpired_Impl( const DateTime& rDateTime ); SAL_DLLPRIVATE SvKeyValueIterator* GetHeaderAttributes_Impl(); - SAL_DLLPRIVATE const String& GetPreRedirectedURL() const; - SAL_DLLPRIVATE void SetOrigFilter_Impl( const SfxFilter* pFilter ); // Diese Protokolle liefern MIME Typen SAL_DLLPRIVATE sal_Bool SupportsMIME_Impl() const; @@ -275,12 +272,9 @@ public: { aLongName = rName; } SAL_DLLPRIVATE const String & GetLongName() const { return aLongName; } SAL_DLLPRIVATE ErrCode CheckOpenMode_Impl( sal_Bool bSilent, sal_Bool bAllowRO = sal_True ); - SAL_DLLPRIVATE sal_Bool IsDownloadDone_Impl(); SAL_DLLPRIVATE sal_Bool IsPreview_Impl(); SAL_DLLPRIVATE void ClearBackup_Impl(); SAL_DLLPRIVATE void Done_Impl( ErrCode ); - SAL_DLLPRIVATE void DataAvailable_Impl(); - SAL_DLLPRIVATE void Cancel_Impl(); SAL_DLLPRIVATE void SetPhysicalName_Impl(const String& rName); SAL_DLLPRIVATE void CanDisposeStorage_Impl( sal_Bool bDisposeStorage ); SAL_DLLPRIVATE sal_Bool WillDisposeStorageOnClose_Impl(); diff --git a/sfx2/inc/sfx2/frmhtml.hxx b/sfx2/inc/sfx2/frmhtml.hxx index c6d007bea86d..b365ab9efebd 100644 --- a/sfx2/inc/sfx2/frmhtml.hxx +++ b/sfx2/inc/sfx2/frmhtml.hxx @@ -52,7 +52,7 @@ protected: public: // These methods can also be used by other parsers. - static void ParseFrameOptions(SfxFrameDescriptor*, const HTMLOptions*, const String& ); + static void ParseFrameOptions(SfxFrameDescriptor*, const HTMLOptions&, const String& ); }; diff --git a/sfx2/inc/sfx2/progress.hxx b/sfx2/inc/sfx2/progress.hxx index f8bd9e7ffb9d..4b1fb074e4b8 100644 --- a/sfx2/inc/sfx2/progress.hxx +++ b/sfx2/inc/sfx2/progress.hxx @@ -82,8 +82,6 @@ public: DECL_DLLPRIVATE_STATIC_LINK( SfxProgress, SetStateHdl, PlugInLoadStatus* ); DECL_DLLPRIVATE_STATIC_LINK( SfxProgress, DefaultBindingProgress, SvProgressArg* ); - SAL_DLLPRIVATE bool StatusBarManagerGone_Impl(SfxStatusBarManager*pStb); - SAL_DLLPRIVATE const String& GetStateText_Impl() const; }; #endif diff --git a/sfx2/inc/sfx2/sfxhtml.hxx b/sfx2/inc/sfx2/sfxhtml.hxx index 9a03eb3afacb..88e3cecf026e 100644 --- a/sfx2/inc/sfx2/sfxhtml.hxx +++ b/sfx2/inc/sfx2/sfxhtml.hxx @@ -65,12 +65,11 @@ public: // Read the options of an image map // <MAP>: sal_True = Image-Map has a name // <AREA>: sal_True = Image-Map has now one Region more - static sal_Bool ParseMapOptions(ImageMap * pImageMap, - const HTMLOptions * pOptions ); - sal_Bool ParseMapOptions(ImageMap * pImageMap) + static bool ParseMapOptions(ImageMap* pImageMap, const HTMLOptions& rOptions); + bool ParseMapOptions(ImageMap * pImageMap) { return ParseMapOptions(pImageMap, GetOptions()); } - static sal_Bool ParseAreaOptions(ImageMap * pImageMap, const String& rBaseURL, - const HTMLOptions * pOptions, + static bool ParseAreaOptions(ImageMap * pImageMap, const String& rBaseURL, + const HTMLOptions& rOptions, sal_uInt16 nEventMouseOver = 0, sal_uInt16 nEventMouseOut = 0 ); inline sal_Bool ParseAreaOptions(ImageMap * pImageMap, const String& rBaseURL, diff --git a/sfx2/inc/sfx2/templatelocnames.hrc b/sfx2/inc/sfx2/templatelocnames.hrc new file mode 100644 index 000000000000..2b659e048195 --- /dev/null +++ b/sfx2/inc/sfx2/templatelocnames.hrc @@ -0,0 +1,81 @@ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Initial Developer of the Original Code is + * Péter Rabi <prabi@caesar.elte.hu> + * Portions created by the Initial Developer are Copyright (C) 2011 the + * Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#define NUM_TEMPLATE_NAMES 25 +#define TEMPL_LOC_OFFSET 2190 + +#define STR_TEMPLATE_NAME1_DEF (TEMPL_LOC_OFFSET + 1) +#define STR_TEMPLATE_NAME2_DEF (TEMPL_LOC_OFFSET + 2) +#define STR_TEMPLATE_NAME3_DEF (TEMPL_LOC_OFFSET + 3) +#define STR_TEMPLATE_NAME4_DEF (TEMPL_LOC_OFFSET + 4) +#define STR_TEMPLATE_NAME5_DEF (TEMPL_LOC_OFFSET + 5) +#define STR_TEMPLATE_NAME6_DEF (TEMPL_LOC_OFFSET + 6) +#define STR_TEMPLATE_NAME7_DEF (TEMPL_LOC_OFFSET + 7) +#define STR_TEMPLATE_NAME8_DEF (TEMPL_LOC_OFFSET + 8) +#define STR_TEMPLATE_NAME9_DEF (TEMPL_LOC_OFFSET + 9) +#define STR_TEMPLATE_NAME10_DEF (TEMPL_LOC_OFFSET + 10) +#define STR_TEMPLATE_NAME11_DEF (TEMPL_LOC_OFFSET + 11) +#define STR_TEMPLATE_NAME12_DEF (TEMPL_LOC_OFFSET + 12) +#define STR_TEMPLATE_NAME13_DEF (TEMPL_LOC_OFFSET + 13) +#define STR_TEMPLATE_NAME14_DEF (TEMPL_LOC_OFFSET + 14) +#define STR_TEMPLATE_NAME15_DEF (TEMPL_LOC_OFFSET + 15) +#define STR_TEMPLATE_NAME16_DEF (TEMPL_LOC_OFFSET + 16) +#define STR_TEMPLATE_NAME17_DEF (TEMPL_LOC_OFFSET + 17) +#define STR_TEMPLATE_NAME18_DEF (TEMPL_LOC_OFFSET + 18) +#define STR_TEMPLATE_NAME19_DEF (TEMPL_LOC_OFFSET + 19) +#define STR_TEMPLATE_NAME20_DEF (TEMPL_LOC_OFFSET + 20) +#define STR_TEMPLATE_NAME21_DEF (TEMPL_LOC_OFFSET + 21) +#define STR_TEMPLATE_NAME22_DEF (TEMPL_LOC_OFFSET + 22) +#define STR_TEMPLATE_NAME23_DEF (TEMPL_LOC_OFFSET + 23) +#define STR_TEMPLATE_NAME24_DEF (TEMPL_LOC_OFFSET + 24) +#define STR_TEMPLATE_NAME25_DEF (TEMPL_LOC_OFFSET + 25) + +#define STR_TEMPLATE_NAME1 (TEMPL_LOC_OFFSET + 51) +#define STR_TEMPLATE_NAME2 (TEMPL_LOC_OFFSET + 52) +#define STR_TEMPLATE_NAME3 (TEMPL_LOC_OFFSET + 53) +#define STR_TEMPLATE_NAME4 (TEMPL_LOC_OFFSET + 54) +#define STR_TEMPLATE_NAME5 (TEMPL_LOC_OFFSET + 55) +#define STR_TEMPLATE_NAME6 (TEMPL_LOC_OFFSET + 56) +#define STR_TEMPLATE_NAME7 (TEMPL_LOC_OFFSET + 57) +#define STR_TEMPLATE_NAME8 (TEMPL_LOC_OFFSET + 58) +#define STR_TEMPLATE_NAME9 (TEMPL_LOC_OFFSET + 59) +#define STR_TEMPLATE_NAME10 (TEMPL_LOC_OFFSET + 60) +#define STR_TEMPLATE_NAME11 (TEMPL_LOC_OFFSET + 61) +#define STR_TEMPLATE_NAME12 (TEMPL_LOC_OFFSET + 62) +#define STR_TEMPLATE_NAME13 (TEMPL_LOC_OFFSET + 63) +#define STR_TEMPLATE_NAME14 (TEMPL_LOC_OFFSET + 64) +#define STR_TEMPLATE_NAME15 (TEMPL_LOC_OFFSET + 65) +#define STR_TEMPLATE_NAME16 (TEMPL_LOC_OFFSET + 66) +#define STR_TEMPLATE_NAME17 (TEMPL_LOC_OFFSET + 67) +#define STR_TEMPLATE_NAME18 (TEMPL_LOC_OFFSET + 68) +#define STR_TEMPLATE_NAME19 (TEMPL_LOC_OFFSET + 69) +#define STR_TEMPLATE_NAME20 (TEMPL_LOC_OFFSET + 70) +#define STR_TEMPLATE_NAME21 (TEMPL_LOC_OFFSET + 71) +#define STR_TEMPLATE_NAME22 (TEMPL_LOC_OFFSET + 72) +#define STR_TEMPLATE_NAME23 (TEMPL_LOC_OFFSET + 73) +#define STR_TEMPLATE_NAME24 (TEMPL_LOC_OFFSET + 74) +#define STR_TEMPLATE_NAME25 (TEMPL_LOC_OFFSET + 75) diff --git a/sfx2/source/bastyp/frmhtml.cxx b/sfx2/source/bastyp/frmhtml.cxx index 19c11b525dab..75cd28be416f 100644 --- a/sfx2/source/bastyp/frmhtml.cxx +++ b/sfx2/source/bastyp/frmhtml.cxx @@ -65,7 +65,8 @@ static HTMLOptionEnum const aScollingTable[] = { 0, 0 } }; -void SfxFrameHTMLParser::ParseFrameOptions( SfxFrameDescriptor *pFrame, const HTMLOptions *pOptions, const String& rBaseURL ) +void SfxFrameHTMLParser::ParseFrameOptions( + SfxFrameDescriptor *pFrame, const HTMLOptions& rOptions, const String& rBaseURL ) { // Get and set the options Size aMargin( pFrame->GetMargin() ); @@ -77,16 +78,15 @@ void SfxFrameHTMLParser::ParseFrameOptions( SfxFrameDescriptor *pFrame, const HT // We will not mimic that bug ! sal_Bool bMarginWidth = sal_False, bMarginHeight = sal_False; - sal_uInt16 nArrLen = pOptions->Count(); - for ( sal_uInt16 i=0; i<nArrLen; i++ ) + for (size_t i = 0, n = rOptions.size(); i < n; ++i) { - const HTMLOption *pOption = (*pOptions)[i]; - switch( pOption->GetToken() ) + const HTMLOption& aOption = rOptions[i]; + switch( aOption.GetToken() ) { case HTML_O_BORDERCOLOR: { Color aColor; - pOption->GetColor( aColor ); + aOption.GetColor( aColor ); pFrame->SetWallpaper( Wallpaper( aColor ) ); break; } @@ -94,20 +94,20 @@ void SfxFrameHTMLParser::ParseFrameOptions( SfxFrameDescriptor *pFrame, const HT pFrame->SetURL( String( INetURLObject::GetAbsURL( - rBaseURL, pOption->GetString())) ); + rBaseURL, aOption.GetString())) ); break; case HTML_O_NAME: - pFrame->SetName( pOption->GetString() ); + pFrame->SetName( aOption.GetString() ); break; case HTML_O_MARGINWIDTH: - aMargin.Width() = pOption->GetNumber(); + aMargin.Width() = aOption.GetNumber(); if( !bMarginHeight ) aMargin.Height() = 0; bMarginWidth = sal_True; break; case HTML_O_MARGINHEIGHT: - aMargin.Height() = pOption->GetNumber(); + aMargin.Height() = aOption.GetNumber(); if( !bMarginWidth ) aMargin.Width() = 0; @@ -115,12 +115,12 @@ void SfxFrameHTMLParser::ParseFrameOptions( SfxFrameDescriptor *pFrame, const HT break; case HTML_O_SCROLLING: pFrame->SetScrollingMode( - (ScrollingMode)pOption->GetEnum( aScollingTable, + (ScrollingMode)aOption.GetEnum( aScollingTable, ScrollingAuto ) ); break; case HTML_O_FRAMEBORDER: { - String aStr = pOption->GetString(); + String aStr = aOption.GetString(); sal_Bool bBorder = sal_True; if ( aStr.EqualsIgnoreCaseAscii("NO") || aStr.EqualsIgnoreCaseAscii("0") ) @@ -132,19 +132,19 @@ void SfxFrameHTMLParser::ParseFrameOptions( SfxFrameDescriptor *pFrame, const HT pFrame->SetResizable( sal_False ); break; default: - if ( pOption->GetTokenString().EqualsIgnoreCaseAscii( + if ( aOption.GetTokenString().EqualsIgnoreCaseAscii( HTML_O_READONLY ) ) { - String aStr = pOption->GetString(); + String aStr = aOption.GetString(); sal_Bool bReadonly = sal_True; if ( aStr.EqualsIgnoreCaseAscii("FALSE") ) bReadonly = sal_False; pFrame->SetReadOnly( bReadonly ); } - else if ( pOption->GetTokenString().EqualsIgnoreCaseAscii( + else if ( aOption.GetTokenString().EqualsIgnoreCaseAscii( HTML_O_EDIT ) ) { - String aStr = pOption->GetString(); + String aStr = aOption.GetString(); sal_Bool bEdit = sal_True; if ( aStr.EqualsIgnoreCaseAscii("FALSE") ) bEdit = sal_False; diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx index 15d40a0d568b..e00fbda6c374 100644 --- a/sfx2/source/bastyp/helper.cxx +++ b/sfx2/source/bastyp/helper.cxx @@ -121,33 +121,6 @@ sal_Bool SfxContentHelper::IsDocument( const String& rContent ) // ----------------------------------------------------------------------- -sal_Bool SfxContentHelper::Kill( const String& rContent ) -{ - sal_Bool bRet = sal_True; - INetURLObject aDeleteObj( rContent ); - DBG_ASSERT( aDeleteObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" ); - - try - { - ::ucbhelper::Content aCnt( aDeleteObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () ); - aCnt.executeCommand( OUString(RTL_CONSTASCII_USTRINGPARAM("delete")), uno::makeAny( sal_Bool( sal_True ) ) ); - } - catch( const ucb::CommandAbortedException& ) - { - DBG_WARNING( "CommandAbortedException" ); - bRet = sal_False; - } - catch( const uno::Exception& ) - { - DBG_ERRORFILE( "Any other exception" ); - bRet = sal_False; - } - - return bRet; -} - -// ----------------------------------------------------------------------- - uno::Sequence < OUString > SfxContentHelper::GetResultSet( const String& rURL ) { StringList_Impl* pList = NULL; diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx index 8905cc9f5d39..534abbfe8c89 100644 --- a/sfx2/source/bastyp/progress.cxx +++ b/sfx2/source/bastyp/progress.cxx @@ -258,13 +258,6 @@ void SfxProgress::SetText // ----------------------------------------------------------------------- -const String& SfxProgress::GetStateText_Impl() const -{ - return pImp->aStateText; -} - -// ----------------------------------------------------------------------- - // Required in App data static sal_uIntPtr nLastTime = 0; @@ -669,21 +662,4 @@ void SfxProgress::LeaveLock() pImp->nRescheduleLocks--; } -// ----------------------------------------------------------------------- - -bool SfxProgress::StatusBarManagerGone_Impl -( - SfxStatusBarManager * // This <SfxStatusBarManager> will be destroyed -) - -/* [Description] - - Internal method for notifying the SfxProgress that the specified - SfxStatusBarManger will be destroyed so that the Progress can let go of it. -*/ - -{ - return sal_True; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx index ede1f873d6bc..bc33faba52db 100644 --- a/sfx2/source/bastyp/sfxhtml.cxx +++ b/sfx2/source/bastyp/sfxhtml.cxx @@ -96,21 +96,20 @@ SfxHTMLParser::~SfxHTMLParser() delete pDLMedium; } -sal_Bool SfxHTMLParser::ParseMapOptions(ImageMap * pImageMap, - const HTMLOptions * pOptions) +bool SfxHTMLParser::ParseMapOptions( + ImageMap* pImageMap, const HTMLOptions& rOptions) { DBG_ASSERT( pImageMap, "ParseMapOptions: No Image-Map" ); - DBG_ASSERT( pOptions, "ParseMapOptions: No Options" ); String aName; - for( sal_uInt16 i=pOptions->Count(); i; ) + for (size_t i = rOptions.size(); i; ) { - const HTMLOption *pOption = (*pOptions)[--i]; - switch( pOption->GetToken() ) + const HTMLOption& aOption = rOptions[--i]; + switch( aOption.GetToken() ) { case HTML_O_NAME: - aName = pOption->GetString(); + aName = aOption.GetString(); break; } } @@ -121,13 +120,12 @@ sal_Bool SfxHTMLParser::ParseMapOptions(ImageMap * pImageMap, return aName.Len() > 0; } -sal_Bool SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const String& rBaseURL, - const HTMLOptions * pOptions, +bool SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const String& rBaseURL, + const HTMLOptions& rOptions, sal_uInt16 nEventMouseOver, sal_uInt16 nEventMouseOut ) { DBG_ASSERT( pImageMap, "ParseAreaOptions: no Image-Map" ); - DBG_ASSERT( pOptions, "ParseAreaOptions: no Options" ); sal_uInt16 nShape = IMAP_OBJ_RECTANGLE; SvULongs aCoords; @@ -135,33 +133,33 @@ sal_Bool SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const String& rBa sal_Bool bNoHRef = sal_False; SvxMacroTableDtor aMacroTbl; - for( sal_uInt16 i=pOptions->Count(); i; ) + for (size_t i = rOptions.size(); i; ) { sal_uInt16 nEvent = 0; ScriptType eScrpType = STARBASIC; - const HTMLOption *pOption = (*pOptions)[--i]; - switch( pOption->GetToken() ) + const HTMLOption& rOption = rOptions[--i]; + switch( rOption.GetToken() ) { case HTML_O_NAME: - aName = pOption->GetString(); + aName = rOption.GetString(); break; case HTML_O_SHAPE: - pOption->GetEnum( nShape, aAreaShapeOptEnums ); + rOption.GetEnum( nShape, aAreaShapeOptEnums ); break; case HTML_O_COORDS: - pOption->GetNumbers( aCoords, sal_True ); + rOption.GetNumbers( aCoords, sal_True ); break; case HTML_O_HREF: - aHRef = INetURLObject::GetAbsURL( rBaseURL, pOption->GetString() ); + aHRef = INetURLObject::GetAbsURL( rBaseURL, rOption.GetString() ); break; case HTML_O_NOHREF: bNoHRef = sal_True; break; case HTML_O_ALT: - aAlt = pOption->GetString(); + aAlt = rOption.GetString(); break; case HTML_O_TARGET: - aTarget = pOption->GetString(); + aTarget = rOption.GetString(); break; case HTML_O_ONMOUSEOVER: @@ -178,7 +176,7 @@ sal_Bool SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const String& rBa IMAPOBJ_SETEVENT: if( nEvent ) { - String sTmp( pOption->GetString() ); + String sTmp( rOption.GetString() ); if( sTmp.Len() ) { sTmp.ConvertLineEnd(); diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 5c5ce9685953..2de5796370e2 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -323,17 +323,6 @@ public: ~SfxMedium_Impl(); }; -void SfxMedium::DataAvailable_Impl() -{ - pImp->aAvailableLink.ClearPendingCall(); - pImp->aAvailableLink.Call( NULL ); -} - -void SfxMedium::Cancel_Impl() -{ - SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); -} - //------------------------------------------------------------------ SfxMedium_Impl::SfxMedium_Impl( SfxMedium* pAntiImplP ) : SvCompatWeakBase( pAntiImplP ), @@ -2587,13 +2576,6 @@ const SfxFilter* SfxMedium::GetOrigFilter( sal_Bool bNotCurrent ) const //---------------------------------------------------------------- -void SfxMedium::SetOrigFilter_Impl( const SfxFilter* pOrigFilter ) -{ - pImp->pOrigFilter = pOrigFilter; -} - -//------------------------------------------------------------------ - sal_uInt32 SfxMedium::CreatePasswordToModifyHash( const ::rtl::OUString& aPasswd, sal_Bool bWriter ) { sal_uInt32 nHash = 0; @@ -2753,10 +2735,6 @@ void SfxMedium::CloseStreams_Impl() //------------------------------------------------------------------ -void SfxMedium::RefreshName_Impl() -{ -} - void SfxMedium::SetIsRemote_Impl() { INetURLObject aObj( GetName() ); @@ -3040,13 +3018,6 @@ const INetURLObject& SfxMedium::GetURLObject() const //---------------------------------------------------------------- -const String& SfxMedium::GetPreRedirectedURL() const -{ - return pImp->aPreRedirectionURL; -} - -//---------------------------------------------------------------- - void SfxMedium::SetReferer( const String& rRefer ) { pImp->aReferer = rRefer; @@ -3144,11 +3115,6 @@ SvCompatWeakHdl* SfxMedium::GetHdl() return pImp->GetHdl(); } -sal_Bool SfxMedium::IsDownloadDone_Impl() -{ - return pImp->bDownloadDone; -} - ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SfxMedium::GetInputStream() { if ( !pImp->xInputStream.is() ) diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index d28d0e6c5c72..dc72cb573e99 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -94,6 +94,7 @@ using namespace ::ucbhelper; #include "sfxtypes.hxx" #include <sfx2/app.hxx> #include "sfx2/sfxresid.hxx" +#include <sfx2/templatelocnames.hrc> #include "doc.hrc" #include <sfx2/fcontnr.hxx> #include <svtools/templatefoldercache.hxx> @@ -151,6 +152,8 @@ class DocTempl_EntryData_Impl private: RegionData_Impl* GetParent() const { return mpParent; } + OUString ConvertResourceString( + int nSourceResIds, int nDestResIds, int nCount, const OUString& rString ); public: DocTempl_EntryData_Impl( RegionData_Impl* pParent, @@ -1761,12 +1764,27 @@ DocTempl_EntryData_Impl::DocTempl_EntryData_Impl( RegionData_Impl* pParent, const OUString& rTitle ) { mpParent = pParent; - maTitle = rTitle; + maTitle = ConvertResourceString( + STR_TEMPLATE_NAME1_DEF, STR_TEMPLATE_NAME1, NUM_TEMPLATE_NAMES, rTitle ); mbIsOwner = sal_False; mbDidConvert= sal_False; } // ----------------------------------------------------------------------- +OUString DocTempl_EntryData_Impl::ConvertResourceString ( + int nSourceResIds, int nDestResIds, int nCount, const OUString& rString ) +{ + for( int i = 0; i < nCount; ++i ) + { + if( rString == ResId::toString( (const ResId)SfxResId( (sal_uInt16)(nSourceResIds + i) ) ) ) + { + return ResId::toString( (const ResId)SfxResId( (sal_uInt16)(nDestResIds + i) ) ); + } + } + return rString; +} + +// ----------------------------------------------------------------------- int DocTempl_EntryData_Impl::Compare( const OUString& rTitle ) const { return maTitle.compareTo( rTitle ); diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index c263b7521bba..743fe48e65cf 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -104,19 +104,6 @@ void SfxPreviewBase_Impl::Resize() Invalidate(); } -void SfxPreviewBase_Impl::SetGDIFile( ::boost::shared_ptr<GDIMetaFile> pFile ) -{ - pMetaFile = pFile; - Invalidate(); -} - -SfxFrameWindow* SfxPreviewWin_Impl::PreviewFactory( - SfxFrame* pFrame, const String& /*rName*/ ) -{ - return new SfxFrameWindow( new SfxPreviewWin_Impl( - &pFrame->GetCurrentViewFrame()->GetWindow() ) ); -} - void SfxPreviewWin_Impl::ImpPaint( const Rectangle&, GDIMetaFile* pFile, Window* pWindow ) { diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 769328e14635..14d87ac3df96 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -2079,33 +2079,6 @@ sal_Bool SfxObjectShell::UseInteractionToHandleError( return bResult; } -sal_Bool SfxObjectShell_Impl::NeedsOfficeUpdateDialog() -{ - // if the configuration is not available for any reason, the default behavior is to show the message - sal_Bool bResult = sal_True; - - try - { - uno::Reference< lang::XMultiServiceFactory > xServiceManager( ::comphelper::getProcessServiceFactory(), uno::UNO_SET_THROW ); - uno::Reference< uno::XInterface > xCommonConfig( - ::comphelper::ConfigurationHelper::openConfig( - xServiceManager, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Common" ) ), - ::comphelper::ConfigurationHelper::E_STANDARD ), - uno::UNO_SET_THROW ); - - ::comphelper::ConfigurationHelper::readRelativeKey( - xCommonConfig, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Load/" ) ), - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ShowOfficeUpdateDialog" ) ) ) >>= bResult; - } - catch( uno::Exception& ) - { - } - - return bResult; -} - sal_Int16 SfxObjectShell_Impl::getCurrentMacroExecMode() const { sal_Int16 nImposedExecMode( MacroExecMode::NEVER_EXECUTE ); diff --git a/sfx2/source/doc/templatelocnames.src b/sfx2/source/doc/templatelocnames.src new file mode 100644 index 000000000000..9b977554a466 --- /dev/null +++ b/sfx2/source/doc/templatelocnames.src @@ -0,0 +1,281 @@ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Initial Developer of the Original Code is + * Péter Rabi <prabi@caesar.elte.hu> + * Portions created by the Initial Developer are Copyright (C) 2011 the + * Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#include <sfx2/templatelocnames.hrc> + +// Do not translate STR_TEMPLATE_NAME*_DEF names!! +String STR_TEMPLATE_NAME1_DEF +{ + Text = "Blue Border" ; +}; + +String STR_TEMPLATE_NAME2_DEF +{ + Text = "Black and White" ; +}; + +String STR_TEMPLATE_NAME3_DEF +{ + Text = "Blue and Grey" ; +}; + +String STR_TEMPLATE_NAME4_DEF +{ + Text = "Blue Lines and Gradients" ; +}; + +String STR_TEMPLATE_NAME5_DEF +{ + Text = "Blue with Bottom Title" ; +}; + +String STR_TEMPLATE_NAME6_DEF +{ + Text = "Notebook" ; +}; + +String STR_TEMPLATE_NAME7_DEF +{ + Text = "Brown" ; +}; + +String STR_TEMPLATE_NAME8_DEF +{ + Text = "Characters with Glow" ; +}; + +String STR_TEMPLATE_NAME9_DEF +{ + Text = "Forest" ; +}; + +String STR_TEMPLATE_NAME10_DEF +{ + Text = "Fresco" ; +}; + +String STR_TEMPLATE_NAME11_DEF +{ + Text = "Glacier" ; +}; + +String STR_TEMPLATE_NAME12_DEF +{ + Text = "Green with White Lines" ; +}; + +String STR_TEMPLATE_NAME13_DEF +{ + Text = "Keyboard" ; +}; + +String STR_TEMPLATE_NAME14_DEF +{ + Text = "Light Blue Shapes" ; +}; + +String STR_TEMPLATE_NAME15_DEF +{ + Text = "Numbers on Dark Background" ; +}; + +String STR_TEMPLATE_NAME16_DEF +{ + Text = "Blue Step Gradients" ; +}; + +String STR_TEMPLATE_NAME17_DEF +{ + Text = "White Blue and Lightnings" ; +}; + +String STR_TEMPLATE_NAME18_DEF +{ + Text = "Noise Paper" ; +}; + +String STR_TEMPLATE_NAME19_DEF +{ + Text = "Red Noise Shapes" ; +}; + +String STR_TEMPLATE_NAME20_DEF +{ + Text = "Rounded Rectangles" ; +}; + +String STR_TEMPLATE_NAME21_DEF +{ + Text = "Blue and Red Gradient" ; +}; + +String STR_TEMPLATE_NAME22_DEF +{ + Text = "Technical Polygon" ; +}; + +String STR_TEMPLATE_NAME23_DEF +{ + Text = "Tunnel" ; +}; + +String STR_TEMPLATE_NAME24_DEF +{ + Text = "Water" ; +}; + +String STR_TEMPLATE_NAME25_DEF +{ + Text = "Wine" ; +}; + +///////////////////////////////////////////////// + +String STR_TEMPLATE_NAME1 +{ + Text [ en-US ] = "Blue Border" ; +}; + +String STR_TEMPLATE_NAME2 +{ + Text [ en-US ] = "Black and White" ; +}; + +String STR_TEMPLATE_NAME3 +{ + Text [ en-US ] = "Blue and Grey" ; +}; + +String STR_TEMPLATE_NAME4 +{ + Text [ en-US ] = "Blue Lines and Gradients" ; +}; + +String STR_TEMPLATE_NAME5 +{ + Text [ en-US ] = "Blue with Bottom Title" ; +}; + +String STR_TEMPLATE_NAME6 +{ + Text [ en-US ] = "Notebook" ; +}; + +String STR_TEMPLATE_NAME7 +{ + Text [ en-US ] = "Brown" ; +}; + +String STR_TEMPLATE_NAME8 +{ + Text [ en-US ] = "Characters with Glow" ; +}; + +String STR_TEMPLATE_NAME9 +{ + Text [ en-US ] = "Forest" ; +}; + +String STR_TEMPLATE_NAME10 +{ + Text [ en-US ] = "Fresco" ; +}; + +String STR_TEMPLATE_NAME11 +{ + Text [ en-US ] = "Glacier" ; +}; + +String STR_TEMPLATE_NAME12 +{ + Text [ en-US ] = "Green with White Lines" ; +}; + +String STR_TEMPLATE_NAME13 +{ + Text [ en-US ] = "Keyboard" ; +}; + +String STR_TEMPLATE_NAME14 +{ + Text [ en-US ] = "Light Blue Shapes" ; +}; + +String STR_TEMPLATE_NAME15 +{ + Text [ en-US ] = "Numbers on Dark Background" ; +}; + +String STR_TEMPLATE_NAME16 +{ + Text [ en-US ] = "Blue Step Gradients" ; +}; + +String STR_TEMPLATE_NAME17 +{ + Text [ en-US ] = "White Blue and Lightnings" ; +}; + +String STR_TEMPLATE_NAME18 +{ + Text [ en-US ] = "Noise Paper" ; +}; + +String STR_TEMPLATE_NAME19 +{ + Text [ en-US ] = "Red Noise Shapes" ; +}; + +String STR_TEMPLATE_NAME20 +{ + Text [ en-US ] = "Rounded Rectangles" ; +}; + +String STR_TEMPLATE_NAME21 +{ + Text [ en-US ] = "Blue and Red Gradient" ; +}; + +String STR_TEMPLATE_NAME22 +{ + Text [ en-US ] = "Technical Polygon" ; +}; + +String STR_TEMPLATE_NAME23 +{ + Text [ en-US ] = "Tunnel" ; +}; + +String STR_TEMPLATE_NAME24 +{ + Text [ en-US ] = "Water" ; +}; + +String STR_TEMPLATE_NAME25 +{ + Text [ en-US ] = "Wine" ; +}; diff --git a/sfx2/source/inc/helper.hxx b/sfx2/source/inc/helper.hxx index 8059510bda85..36b8ee9e3d46 100644 --- a/sfx2/source/inc/helper.hxx +++ b/sfx2/source/inc/helper.hxx @@ -43,7 +43,6 @@ class SfxContentHelper { public: static sal_Bool IsDocument( const String& rContent ); - static sal_Bool Kill( const String& rContent ); static ::com::sun::star::uno::Sequence< ::rtl::OUString > GetResultSet( const String& rURL ); diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx index 023031334fd3..9d32752771d2 100644 --- a/sfx2/source/inc/objshimp.hxx +++ b/sfx2/source/inc/objshimp.hxx @@ -157,8 +157,6 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess SfxObjectShell_Impl( SfxObjectShell& _rDocShell ); virtual ~SfxObjectShell_Impl(); - static sal_Bool NeedsOfficeUpdateDialog(); - // IMacroDocumentAccess overridables virtual sal_Int16 getCurrentMacroExecMode() const; virtual sal_Bool setCurrentMacroExecMode( sal_uInt16 nMacroMode ); diff --git a/sfx2/source/inc/preview.hxx b/sfx2/source/inc/preview.hxx index 483e651fa604..35b7d2c98b3e 100644 --- a/sfx2/source/inc/preview.hxx +++ b/sfx2/source/inc/preview.hxx @@ -48,7 +48,6 @@ public: SfxPreviewBase_Impl( Window* pParent ); ~SfxPreviewBase_Impl( ); void SetObjectShell( SfxObjectShell* pObj ); - void SetGDIFile( ::boost::shared_ptr<GDIMetaFile> pFile ); virtual void Resize(); }; @@ -66,8 +65,6 @@ public: : SfxPreviewBase_Impl( pParent ){}; static void ImpPaint( const Rectangle& rRect, GDIMetaFile* pFile, Window* pWindow ); - static SfxFrameWindow* - PreviewFactory( SfxFrame* pFrame, const String& rName ); }; #endif |