diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-12-12 12:52:51 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-12-12 12:52:51 +0000 |
commit | 1e29c3191e045842466415b44090d5cb176f7bfd (patch) | |
tree | a7a2e8d52c870b806a4eab0700b60580eb552ac8 /svx | |
parent | 1f9f07c848ae33cd9cd301da6d8ea00cd31359d0 (diff) |
CWS-TOOLING: integrate CWS fwk92
2008-12-04 14:43:28 +0100 oc r264844 : #i96788#
2008-12-03 02:15:17 +0100 fredrikh r264734 : i96817
2008-12-02 16:42:46 +0100 tbo r264720 : #i96763# changes to password dialog for framework, math, global
2008-11-26 16:26:28 +0100 mav r264418 : #i93617# fix typo
2008-11-26 16:13:03 +0100 mav r264411 : #i93617# fix the linux scenario
2008-11-25 17:58:01 +0100 mav r264323 : #i93617# fix the windows problems
2008-11-25 17:51:33 +0100 mav r264321 : #i93617# fix the windows problems
2008-11-21 16:01:18 +0100 mav r264145 : #i78753# integrate the patch
2008-11-21 14:08:32 +0100 mav r264136 : #i93617# integrate the patch
2008-11-21 13:01:56 +0100 mav r264127 : #i82947# integrate the patch
2008-11-20 18:14:19 +0100 mav r264092 : #i95793# look for import filter
2008-11-18 15:23:44 +0100 pb r263776 : fix: #i92579# #i92583# SvxSecurity/SearchPage: more space for controls
2008-11-18 15:21:39 +0100 pb r263774 : fix: #i92579# #i92583# SvxSecurity/SearchPage: more space for controls
2008-11-18 15:18:54 +0100 pb r263772 : fix: #i92583# SvxSearchPage::InitControls_Impl() added
2008-11-18 15:16:07 +0100 pb r263771 : fix: #i92579# columns calculated newly
2008-11-18 11:09:28 +0100 mav r263751 : #i21923# small fixes
2008-11-17 17:22:04 +0100 mav r263730 : #i21923# integrate the patch
2008-11-17 14:29:02 +0100 mav r263723 : #i21923# integrate the patch
2008-11-13 16:46:08 +0100 mav r263653 : #i88127# integrate the patch
2008-11-13 14:46:56 +0100 mav r263645 : #i54638# integrate the patch
2008-11-11 13:11:03 +0100 pb r263554 : fix: #i93142# disable maRecommReadOnlyCB on read-only documents
2008-11-10 13:30:58 +0100 pb r263516 : fix: #i93833# Mozilla Plug-in -> Browser Plug-in
2008-11-10 13:29:10 +0100 pb r263515 : fix: #i93833# Mozilla Plug-in -> Browser Plug-in
2008-11-10 06:10:11 +0100 pb r263505 : fix: #i94937# now .uno.ExtendedHelp without image
2008-11-04 20:52:50 +0100 mav r263337 : migrate cws fwk92 to svn
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/optinet2.hrc | 5 | ||||
-rw-r--r-- | svx/inc/svx/svdetc.hxx | 3 | ||||
-rw-r--r-- | svx/inc/svx/svdoole2.hxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/optinet2.cxx | 75 | ||||
-rw-r--r-- | svx/source/dialog/optinet2.hxx | 19 | ||||
-rw-r--r-- | svx/source/dialog/treeopt.src | 2 | ||||
-rw-r--r-- | svx/source/msfilter/msdffimp.cxx | 14 | ||||
-rw-r--r-- | svx/source/options/optinet2.src | 57 | ||||
-rw-r--r-- | svx/source/svdraw/svdetc.cxx | 91 | ||||
-rw-r--r-- | svx/source/svdraw/svdoole2.cxx | 7 |
10 files changed, 195 insertions, 82 deletions
diff --git a/svx/inc/optinet2.hrc b/svx/inc/optinet2.hrc index a31c1b801544..2aa78d05bdd4 100644 --- a/svx/inc/optinet2.hrc +++ b/svx/inc/optinet2.hrc @@ -133,10 +133,9 @@ #define BORDER_OFFSET 8 #define COL_0 (RSC_SP_TBPG_INNERBORDER_LEFT) #define COL_1 (COL_0+RSC_SP_FLGR_SPACE_X) -#define COL_5 (TP_WIDTH-RSC_SP_TBPG_INNERBORDER_RIGHT) -#define COL_4 (COL_5-RSC_SP_FLGR_SPACE_X) +#define COL_4 (TP_WIDTH-RSC_SP_TBPG_INNERBORDER_RIGHT) #define COL_3 (COL_4-RSC_CD_PUSHBUTTON_WIDTH) -#define COL_2 (COL_3-RSC_SP_CTRL_X) +#define COL_2 (COL_3-RSC_SP_CTRL_DESC_X) #define ROW_0 (RSC_SP_FLGR_INNERBORDER_TOP) #define ROW_1 (ROW_0+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_FLGR_SPACE_Y) diff --git a/svx/inc/svx/svdetc.hxx b/svx/inc/svx/svdetc.hxx index a72b8a4a1c0d..40ece921f6a2 100644 --- a/svx/inc/svx/svdetc.hxx +++ b/svx/inc/svx/svdetc.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: svdetc.hxx,v $ - * $Revision: 1.4 $ + * $Revision: 1.4.152.1 $ * * This file is part of OpenOffice.org. * @@ -293,6 +293,7 @@ class OLEObjCache : public Container ULONG nSize; AutoTimer* pTimer; + void UnloadOnDemand(); BOOL UnloadObj( SdrOle2Obj* pObj ); DECL_LINK( UnloadCheckHdl, AutoTimer* ); diff --git a/svx/inc/svx/svdoole2.hxx b/svx/inc/svx/svdoole2.hxx index bf16d781215c..6cf41fce8ac1 100644 --- a/svx/inc/svx/svdoole2.hxx +++ b/svx/inc/svx/svdoole2.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: svdoole2.hxx,v $ - * $Revision: 1.6 $ + * $Revision: 1.5.60.2 $ * * This file is part of OpenOffice.org. * @@ -126,6 +126,8 @@ public: void SetObjRef(const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& rNewObjRef); com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetObjRef() const; + SVX_DLLPRIVATE com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetObjRef_NoInit() const; + void AbandonObject(); virtual void SetPage(SdrPage* pNewPage); diff --git a/svx/source/dialog/optinet2.cxx b/svx/source/dialog/optinet2.cxx index f60e3f4862fd..3475a4990fc1 100644 --- a/svx/source/dialog/optinet2.cxx +++ b/svx/source/dialog/optinet2.cxx @@ -777,6 +777,7 @@ SvxSearchTabPage::SvxSearchTabPage(Window* pParent, const SfxItemSet& rSet ) : sModifyMsg(SVX_RES(MSG_MODIFY)) { FreeResource(); + SetExchangeSupport(); aCaseED.SelectEntryPos(0); // falls kein Eintrag vorhanden ist, kann es sonst "Arger geben @@ -797,6 +798,8 @@ SvxSearchTabPage::SvxSearchTabPage(Window* pParent, const SfxItemSet& rSet ) : aAndRB.SetClickHdl( aLink ); aOrRB.SetClickHdl( aLink ); aExactRB.SetClickHdl( aLink ); + + InitControls_Impl(); } // ----------------------------------------------------------------------- @@ -921,6 +924,52 @@ BOOL SvxSearchTabPage::ConfirmLeave( const String& rStringSelection) } return TRUE; } + +// ----------------------------------------------------------------------- + +void SvxSearchTabPage::InitControls_Impl() +{ + // detect longest label text + sal_Int32 i = 0; + long nLabelTextWidth = 0; + Window* pLabels[] = { &aSearchNameFT, &aSearchFT, &aURLFT, &aPostFixFT, &aSeparatorFT, &aCaseFT }; + Window** pLabel = pLabels; + const sal_Int32 nLabelCount = sizeof( pLabels ) / sizeof( pLabels[0] ); + for ( ; i < nLabelCount; ++i, ++pLabel ) + { + long nTemp = (*pLabel)->GetCtrlTextWidth( (*pLabel)->GetText() ); + if ( nTemp > nLabelTextWidth ) + nLabelTextWidth = nTemp; + } + + // resize all labels + nLabelTextWidth = nLabelTextWidth * 120 / 100; // additional space looks better + const long nLabelWidth = aSearchNameFT.GetSizePixel().Width(); + const long nDelta = nLabelWidth - nLabelTextWidth; + pLabel = pLabels; + for ( i = 0; i < nLabelCount; ++i, ++pLabel ) + { + Size aNewSize = (*pLabel)->GetSizePixel(); + aNewSize.Width() += nDelta; + (*pLabel)->SetSizePixel( aNewSize ); + } + + // resize and move the edits + Window* pEdits[] = { &aSearchNameED, &aAndRB, &aOrRB, + &aExactRB, &aURLED, &aPostFixED, &aSeparatorED, &aCaseED }; + Window** pEdit = pEdits; + const sal_Int32 nCCount = sizeof( pEdits ) / sizeof( pEdits[ 0 ] ); + for ( i = 0; i < nCCount; ++i, ++pEdit ) + { + Point aNewPos = (*pEdit)->GetPosPixel(); + aNewPos.X() -= nDelta; + Size aNewSize = (*pEdit)->GetSizePixel(); + if ( (*pEdit) != &aSeparatorED && (*pEdit) != &aCaseED ) + aNewSize.Width() += nDelta; + (*pEdit)->SetPosSizePixel( aNewPos, aNewSize ); + } +} + // ----------------------------------------------------------------------- IMPL_LINK( SvxSearchTabPage, NewSearchHdl_Impl, PushButton *, EMPTYARG ) @@ -1309,9 +1358,11 @@ SvxSecurityTabPage::SvxSecurityTabPage( Window* pParent, const SfxItemSet& rSet ,mpSecOptions ( new SvtSecurityOptions ) ,mpSecOptDlg ( NULL ) ,meRedlingMode ( RL_NONE ) - ,msProtectRecordsStr( SVX_RES( STR_SEC_PROTRECORDS ) ) - ,msUnprotectRecordsStr( SVX_RES( STR_SEC_UNPROTRECORDS ) ) + + ,msProtectRecordsStr( SVX_RES( STR_SEC_PROTRECORDS ) ) + ,msUnprotectRecordsStr( SVX_RES( STR_SEC_UNPROTRECORDS ) ) ,msPasswordStoringDeactivateStr( SVX_RES( STR_SEC_NOPASSWDSAVE ) ) + { FreeResource(); @@ -1610,21 +1661,33 @@ void SvxSecurityTabPage::InitControls() if ( nTemp > nBtnTextWidth ) nBtnTextWidth = nTemp; } + nBtnTextWidth = nBtnTextWidth * 115 / 100; // a little offset - long nButtonWidth = maSecurityOptionsPB.GetSizePixel().Width(); - long nMaxWidth = nButtonWidth * 130 / 100; + const long nButtonWidth = maSecurityOptionsPB.GetSizePixel().Width(); + const long nMaxWidth = nButtonWidth * 140 / 100; + long nExtra = ( nBtnTextWidth > nMaxWidth ) ? nBtnTextWidth - nMaxWidth : 0; nBtnTextWidth = std::min( nBtnTextWidth, nMaxWidth ); + if ( nBtnTextWidth > nButtonWidth ) { // so make the buttons broader and its control in front of it smaller long nDelta = nBtnTextWidth - nButtonWidth; pButton = pButtons; + + if ( nExtra > 0 ) + { + long nPos = (*pButton)->GetPosPixel().X() - nDelta; + long nWidth = (*pButton)->GetSizePixel().Width() + nDelta; + long nMaxExtra = GetOutputSizePixel().Width() - ( nPos + nWidth ) - 2; + nExtra = ( nExtra < nMaxExtra ) ? nExtra : nMaxExtra; + } + for ( i = 0; i < nBCount; ++i, ++pButton ) { Point aNewPos = (*pButton)->GetPosPixel(); aNewPos.X() -= nDelta; Size aNewSize = (*pButton)->GetSizePixel(); - aNewSize.Width() += nDelta; + aNewSize.Width() += ( nDelta + nExtra ); (*pButton)->SetPosSizePixel( aNewPos, aNewSize ); } @@ -1773,7 +1836,7 @@ void SvxSecurityTabPage::Reset( const SfxItemSet& ) if( pCurDocShell->HasSecurityOptOpenReadOnly() && !bIsHTMLDoc ) { maRecommReadOnlyCB.Check( pCurDocShell->IsSecurityOptOpenReadOnly() ); -//! maRecommReadOnlyCB.Enable( !bIsReadonly ); + maRecommReadOnlyCB.Enable( !bIsReadonly ); } else maRecommReadOnlyCB.Disable(); diff --git a/svx/source/dialog/optinet2.hxx b/svx/source/dialog/optinet2.hxx index 9fb849292da3..6d08b2ec9607 100644 --- a/svx/source/dialog/optinet2.hxx +++ b/svx/source/dialog/optinet2.hxx @@ -191,16 +191,15 @@ private: SvxSearchEngineData aCurrentSrchData; #ifdef _SVX_OPTINET2_CXX - void FillSearchBox_Impl(); - String GetSearchString_Impl(); - - DECL_LINK( NewSearchHdl_Impl, PushButton * ); - DECL_LINK( AddSearchHdl_Impl, PushButton * ); - DECL_LINK( ChangeSearchHdl_Impl, PushButton * ); - DECL_LINK( DeleteSearchHdl_Impl, PushButton * ); - DECL_LINK( SearchEntryHdl_Impl, ListBox * ); - DECL_LINK( SearchModifyHdl_Impl, SvxNoSpaceEdit * ); - DECL_LINK( SearchPartHdl_Impl, RadioButton * ); + void InitControls_Impl(); + + DECL_LINK( NewSearchHdl_Impl, PushButton * ); + DECL_LINK( AddSearchHdl_Impl, PushButton * ); + DECL_LINK( ChangeSearchHdl_Impl, PushButton * ); + DECL_LINK( DeleteSearchHdl_Impl, PushButton * ); + DECL_LINK( SearchEntryHdl_Impl, ListBox * ); + DECL_LINK( SearchModifyHdl_Impl, SvxNoSpaceEdit * ); + DECL_LINK( SearchPartHdl_Impl, RadioButton * ); #endif virtual void ActivatePage( const SfxItemSet& rSet ); diff --git a/svx/source/dialog/treeopt.src b/svx/source/dialog/treeopt.src index 69914bef6161..2bf5d0825cdc 100644 --- a/svx/source/dialog/treeopt.src +++ b/svx/source/dialog/treeopt.src @@ -187,7 +187,7 @@ Resource RID_OFADLG_OPTIONS_TREE_PAGES < "Proxy" ; RID_SVXPAGE_INET_PROXY; > ; < "Search" ; RID_SVXPAGE_INET_SEARCH; > ; < "E-mail" ; RID_SVXPAGE_INET_MAIL; > ; - < "Mozilla Plug-in" ; RID_SVXPAGE_INET_MOZPLUGIN; > ; + < "Browser Plug-in" ; RID_SVXPAGE_INET_MOZPLUGIN; > ; }; //modified by jmeng end }; diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx index f13a07c4785f..821750b55e8b 100644 --- a/svx/source/msfilter/msdffimp.cxx +++ b/svx/source/msfilter/msdffimp.cxx @@ -7552,9 +7552,19 @@ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > SvxMS ::rtl::OUString aName( aDstStgName ); comphelper::EmbeddedObjectContainer aCnt( rDestStorage ); xObj = aCnt.InsertEmbeddedObject( aMedium, aName ); + if ( !xObj.is() ) - // TODO/LATER: error handling - return xObj; + { + if( aFilterName.getLength() ) + { + // throw the filter parameter away as workaround + aMedium.realloc( 2 ); + xObj = aCnt.InsertEmbeddedObject( aMedium, aName ); + } + + if ( !xObj.is() ) + return xObj; + } // TODO/LATER: ViewAspect must be passed from outside! sal_Int64 nViewAspect = embed::Aspects::MSOLE_CONTENT; diff --git a/svx/source/options/optinet2.src b/svx/source/options/optinet2.src index a51b506def0f..b4591a56d657 100644 --- a/svx/source/options/optinet2.src +++ b/svx/source/options/optinet2.src @@ -53,14 +53,14 @@ TabPage RID_SVXPAGE_INET_MOZPLUGIN { Pos = MAP_APPFONT ( 6 , 3 ) ; Size = MAP_APPFONT ( 248 , 8 ) ; - Text[ en-US ] = "Mozilla Plug-in"; + Text[ en-US ] = "Browser Plug-in"; }; CheckBox CB_MOZPLUGIN_CODE { Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; TabStop = TRUE ; - Text [ en-US ] = "~Enable" ; + Text [ en-US ] = "~Display documents in browser" ; }; }; @@ -319,67 +319,67 @@ TabPage RID_SVXPAGE_INET_SEARCH RadioButton RB_AND { Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 26 ) ; - Size = MAP_APPFONT ( 39 , 10 ) ; + Size = MAP_APPFONT ( 125 , 10 ) ; Check = TRUE ; Text [ en-US ] = "And" ; }; RadioButton RB_OR { - Pos = MAP_APPFONT ( EDIT_START_XPOS + 39 + 3 , GB_SEARCH_TOP + 26 ) ; - Size = MAP_APPFONT ( 38 , 10 ) ; + Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 39 ) ; + Size = MAP_APPFONT ( 125 , 10 ) ; Text [ en-US ] = "~Or" ; }; RadioButton RB_EXACT { - Pos = MAP_APPFONT ( EDIT_START_XPOS + 39 + 3 + 38 + 3 , GB_SEARCH_TOP + 26 ) ; - Size = MAP_APPFONT ( 42 , 10 ) ; + Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 52 ) ; + Size = MAP_APPFONT ( 125 , 10 ) ; Text [ en-US ] = "E~xact" ; }; FixedText FT_URL { - Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 41 ) ; + Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 67 ) ; Size = MAP_APPFONT ( LABEL_LEN , 8 ) ; Text [ en-US ] = "~Prefix" ; }; Edit ED_URL { - Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 39 ) ; + Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 65 ) ; Size = MAP_APPFONT ( 125 , 12 ) ; Border = TRUE ; }; FixedText FT_POSTFIX { - Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 56 ) ; + Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 82 ) ; Size = MAP_APPFONT ( LABEL_LEN , 8 ) ; Text [ en-US ] = "Su~ffix" ; }; Edit ED_POSTFIX { - Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 54 ) ; + Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 80 ) ; Size = MAP_APPFONT ( 125 , 12 ) ; Border = TRUE ; }; FixedText FT_SEPARATOR { - Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 71 ) ; + Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 97 ) ; Size = MAP_APPFONT ( LABEL_LEN , 8 ) ; Text [ en-US ] = "~Separator" ; }; Edit ED_SEPARATOR { - Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 69 ) ; + Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 95 ) ; Size = MAP_APPFONT ( 42 , 12 ) ; Border = TRUE ; }; FixedText FT_CASE { - Pos = MAP_APPFONT ( LABEL_START_XPOS, GB_SEARCH_TOP + 86 ) ; + Pos = MAP_APPFONT ( LABEL_START_XPOS, GB_SEARCH_TOP + 112 ) ; Size = MAP_APPFONT ( LABEL_LEN , 8 ) ; Text [ en-US ] = "~Case match" ; }; ListBox ED_CASE { - Pos = MAP_APPFONT ( EDIT_START_XPOS, GB_SEARCH_TOP + 84 ) ; + Pos = MAP_APPFONT ( EDIT_START_XPOS, GB_SEARCH_TOP + 110 ) ; Size = MAP_APPFONT ( 42 , 48 ) ; Border = TRUE ; DropDown = TRUE ; @@ -392,25 +392,25 @@ TabPage RID_SVXPAGE_INET_SEARCH }; PushButton PB_NEW { - Pos = MAP_APPFONT ( 39 , 158 ) ; + Pos = MAP_APPFONT ( 39 , GB_SEARCH_TOP + 131 + 6 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "N~ew"; }; PushButton PB_ADD { - Pos = MAP_APPFONT ( 92 , 158 ) ; + Pos = MAP_APPFONT ( 92 , GB_SEARCH_TOP + 131 + 6 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Add" ; }; PushButton PB_CHANGE { - Pos = MAP_APPFONT ( 145 , 158 ) ; + Pos = MAP_APPFONT ( 145 , GB_SEARCH_TOP + 131 + 6 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Modify" ; }; PushButton PB_DELETE { - Pos = MAP_APPFONT ( 198 , 158 ) ; + Pos = MAP_APPFONT ( 198 , GB_SEARCH_TOP + 131 + 6 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete" ; }; @@ -438,7 +438,7 @@ TabPage RID_SVXPAGE_INET_SECURITY FixedLine FL_SEC_SECURITYOPTIONS { Pos = MAP_APPFONT( COL_0, ROW_0 ); - Size = MAP_APPFONT( COL_5-COL_0, RSC_CD_FIXEDLINE_HEIGHT ); + Size = MAP_APPFONT( COL_4-COL_0, RSC_CD_FIXEDLINE_HEIGHT ); Text [ en-US ] = "Security options and warnings"; }; FixedText FI_SEC_SECURITYOPTIONS @@ -456,25 +456,26 @@ TabPage RID_SVXPAGE_INET_SECURITY }; FixedLine FL_SEC_PASSWORDS { - Pos = MAP_APPFONT( COL_0, ROW_2 ); - Size = MAP_APPFONT( COL_5-COL_0, RSC_CD_FIXEDLINE_HEIGHT ); + Pos = MAP_APPFONT( COL_0, ROW_2 - 2 ); + Size = MAP_APPFONT( COL_4-COL_0, RSC_CD_FIXEDLINE_HEIGHT ); Text [ en-US ] = "Passwords for web connections"; }; CheckBox CB_SEC_SAVEPASSWORDS { - Pos = MAP_APPFONT( COL_1, ROW_3 ); - Size = MAP_APPFONT( COL_2-COL_1, RSC_CD_CHECKBOX_HEIGHT ); + Pos = MAP_APPFONT( COL_1, ROW_3 - 4 ); + Size = MAP_APPFONT( COL_2-COL_1, 16 ); + Wordbreak = TRUE; Text [ en-US ] = "Persistently save passwords protected by a master password"; }; PushButton PB_SEC_MASTERPASSWORD { - Pos = MAP_APPFONT( COL_3, ROW_3 - 2 ); + Pos = MAP_APPFONT( COL_3, ROW_3 - 4 ); Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); Text [ en-US ] = "Master Password..."; }; FixedText FI_SEC_MASTERPASSWORD { - Pos = MAP_APPFONT( COL_1, ROW_4 ); + Pos = MAP_APPFONT( COL_1, ROW_4 + 2 ); Size = MAP_APPFONT( COL_2-COL_1, 4*RSC_CD_FIXEDLINE_HEIGHT ); Wordbreak = TRUE; Text [ en-US ] = "Passwords are protected by a master password. You will be asked to enter it once per session, if %PRODUCTNAME retrieves a password from the protected password list."; @@ -488,7 +489,7 @@ TabPage RID_SVXPAGE_INET_SECURITY FixedLine FL_SEC_MACROSEC { Pos = MAP_APPFONT( COL_0, ROW_5 ); - Size = MAP_APPFONT( COL_5-COL_0, RSC_CD_FIXEDLINE_HEIGHT ); + Size = MAP_APPFONT( COL_4-COL_0, RSC_CD_FIXEDLINE_HEIGHT ); Text [ en-US ] = "Macro security"; }; FixedText FI_SEC_MACROSEC @@ -507,7 +508,7 @@ TabPage RID_SVXPAGE_INET_SECURITY FixedLine FL_SEC_FILESHARING { Pos = MAP_APPFONT( COL_0, ROW_8 ); - Size = MAP_APPFONT( COL_5-COL_0, RSC_CD_FIXEDLINE_HEIGHT ); + Size = MAP_APPFONT( COL_4-COL_0, RSC_CD_FIXEDLINE_HEIGHT ); Text [ en-US ] = "File sharing options for this document"; }; CheckBox CB_SEC_RECOMMREADONLY diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index 4a3e37bfc0ee..b3aa3daf522f 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -32,6 +32,9 @@ #include "precompiled_svx.hxx" #include "forbiddencharacterstable.hxx" +#include <com/sun/star/embed/XEmbeddedObject.hpp> +#include <com/sun/star/embed/EmbedStates.hpp> + #include <svx/svdetc.hxx> #include "svditext.hxx" #include <svx/svdmodel.hxx> @@ -75,6 +78,8 @@ //#i80528# #include <svx/sdr/contact/viewcontact.hxx> +using namespace ::com::sun::star; + /****************************************************************************** * Globale Daten der DrawingEngine ******************************************************************************/ @@ -126,17 +131,8 @@ OLEObjCache::~OLEObjCache() delete pTimer; } -void OLEObjCache::SetSize(ULONG nNewSize) +void OLEObjCache::UnloadOnDemand() { - nSize = nNewSize; -} - -void OLEObjCache::InsertObj(SdrOle2Obj* pObj) -{ - // insert object into first position - Remove(pObj); - Insert(pObj, (ULONG) 0L); - if ( nSize < Count() ) { // more objects than configured cache size try to remove objects @@ -145,14 +141,65 @@ void OLEObjCache::InsertObj(SdrOle2Obj* pObj) ULONG nIndex = nCount2-1; while( nIndex && nCount2 > nSize ) { - SdrOle2Obj* pCacheObj = (SdrOle2Obj*) GetObject(nIndex--); - if ( UnloadObj(pCacheObj) ) - // object was successfully unloaded - nCount2--; + SdrOle2Obj* pUnloadObj = (SdrOle2Obj*) GetObject(nIndex--); + if ( pUnloadObj ) + { + try + { + sal_Bool bUnload = sal_True; + // it is important to get object without reinitialization to avoid reentrance + uno::Reference< embed::XEmbeddedObject > xUnloadObj = pUnloadObj->GetObjRef_NoInit(); + if ( xUnloadObj.is() ) + { + uno::Reference< frame::XModel > xUnloadModel( xUnloadObj->getComponent(), uno::UNO_QUERY ); + if ( xUnloadModel.is() ) + { + for ( ULONG nCheckInd = 0; nCheckInd < Count(); nCheckInd++ ) + { + SdrOle2Obj* pCacheObj = (SdrOle2Obj*) GetObject(nCheckInd); + if ( pCacheObj && pCacheObj != pUnloadObj ) + { + uno::Reference< frame::XModel > xParentModel = pCacheObj->GetParentXModel(); + if ( xUnloadModel == xParentModel ) + bUnload = sal_False; // the object has running embedded objects + } + } + } + } + + if ( bUnload && UnloadObj(pUnloadObj) ) + // object was successfully unloaded + nCount2--; + } + catch( uno::Exception& ) + {} + } } } } +void OLEObjCache::SetSize(ULONG nNewSize) +{ + nSize = nNewSize; +} + +void OLEObjCache::InsertObj(SdrOle2Obj* pObj) +{ + if ( Count() ) + { + SdrOle2Obj* pExistingObj = (SdrOle2Obj*)GetObject( 0 ); + if ( pObj == pExistingObj ) + // the object is already on the top, nothing has to be changed + return; + } + + // insert object into first position + Remove(pObj); + Insert(pObj, (ULONG) 0L); + + UnloadOnDemand(); +} + void OLEObjCache::RemoveObj(SdrOle2Obj* pObj) { Remove(pObj); @@ -184,21 +231,7 @@ BOOL OLEObjCache::UnloadObj(SdrOle2Obj* pObj) IMPL_LINK(OLEObjCache, UnloadCheckHdl, AutoTimer*, /*pTim*/) { - if ( nSize < Count() ) - { - ULONG nCount2 = Count(); - ULONG nIndex = nCount2; - while ( nCount2 > nSize ) - { - SdrOle2Obj* pCacheObj = (SdrOle2Obj*) GetObject( --nIndex ); - if ( UnloadObj(pCacheObj) ) - nCount2--; - - if ( !nIndex ) - break; - } - } - + UnloadOnDemand(); return 0; } diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 4918b639a73f..60cc420716c2 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: svdoole2.cxx,v $ - * $Revision: 1.90 $ + * $Revision: 1.89.60.2 $ * * This file is part of OpenOffice.org. * @@ -2024,6 +2024,11 @@ uno::Reference < embed::XEmbeddedObject > SdrOle2Obj::GetObjRef() const return xObjRef.GetObject(); } +uno::Reference < embed::XEmbeddedObject > SdrOle2Obj::GetObjRef_NoInit() const +{ + return xObjRef.GetObject(); +} + // ----------------------------------------------------------------------------- uno::Reference< frame::XModel > SdrOle2Obj::getXModel() const |