Author: alg Date: Mon Jan 13 16:49:19 2014 New Revision: 1557768 URL: http://svn.apache.org/r1557768 Log: In SvxAreaTabPage offer direct import of graphic (will be also useful for other usages), use in Writer Frames to replace former direct Graphic Import button
Modified: openoffice/branches/alg_writerframes/main/cui/source/inc/cuitabarea.hxx openoffice/branches/alg_writerframes/main/cui/source/tabpages/tabarea.hrc openoffice/branches/alg_writerframes/main/cui/source/tabpages/tabarea.src openoffice/branches/alg_writerframes/main/cui/source/tabpages/tparea.cxx openoffice/branches/alg_writerframes/main/svx/inc/svx/svxids.hrc openoffice/branches/alg_writerframes/main/sw/source/ui/fmtui/tmpdlg.cxx openoffice/branches/alg_writerframes/main/sw/source/ui/frmdlg/frmdlg.cxx Modified: openoffice/branches/alg_writerframes/main/cui/source/inc/cuitabarea.hxx URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/cui/source/inc/cuitabarea.hxx?rev=1557768&r1=1557767&r2=1557768&view=diff ============================================================================== --- openoffice/branches/alg_writerframes/main/cui/source/inc/cuitabarea.hxx (original) +++ openoffice/branches/alg_writerframes/main/cui/source/inc/cuitabarea.hxx Mon Jan 13 16:49:19 2014 @@ -105,10 +105,8 @@ class SvxTransparenceTabPage : public Sv const SfxItemSet& rOutAttrs; RECT_POINT eRP; - //CHINA001 sal_uInt16* pPageType; - //CHINA001 sal_uInt16* pDlgType; - sal_uInt16 nPageType; //add CHINA001 - sal_uInt16 nDlgType; //add CHINA001 + sal_uInt16 nPageType; + sal_uInt16 nDlgType; // main selection FixedLine aFlProp; @@ -238,19 +236,23 @@ private: XHatchListSharedPtr maHatchingList; XBitmapListSharedPtr maBitmapList; + // Placeholders for pointer-based entries; these will be inited + // to point to these so that the page is usable without that + // SvxAreaTabDialog has to call the setter methods (e.g. SetColorChgd). + // Without that the pages used in SvxAreaTabDialog are not usable + ChangeType maFixed_ChangeType; + sal_Bool maFixed_sal_Bool; + ChangeType* pnColorTableState; ChangeType* pnBitmapListState; ChangeType* pnGradientListState; ChangeType* pnHatchingListState; - //CHINA001 sal_uInt16* pPageType; - //CHINA001 sal_uInt16* pDlgType; - //CHINA001 sal_uInt16* pPos; - sal_uInt16 nPageType; //add CHINA001 - sal_uInt16 nDlgType;//add CHINA001 - sal_uInt16 nPos; //add CHINA001 + sal_uInt16 nPageType; + sal_uInt16 nDlgType; + sal_uInt16 nPos; - sal_Bool* pbAreaTP; + sal_Bool* pbAreaTP; XOutdevItemPool* pXPool; XFillAttrSetItem aXFillAttr; @@ -259,6 +261,14 @@ private: SfxMapUnit ePoolUnit; FieldUnit eFUnit; + //UUUU + bool mbOfferImportButton; + bool mbPositionsAdapted; + bool mbDirectGraphicSet; + Graphic maDirectGraphic; + String maDirectName; + PushButton maBtnImport; + #ifdef _SVX_TPAREA_CXX DECL_LINK( SelectDialogTypeHdl_Impl, ListBox * ); DECL_LINK( ClickInvisibleHdl_Impl, void * ); @@ -274,12 +284,16 @@ private: DECL_LINK( ModifyBitmapHdl_Impl, void * ); // DECL_LINK( ModifyTransparentHdl_Impl, void * ); DECL_LINK( ModifyStepCountHdl_Impl, void * ); + + //UUUU + DECL_LINK( ClickImportHdl_Impl, void * ); + DECL_LINK( ModifyTileHdl_Impl, void * ); DECL_LINK( ClickScaleHdl_Impl, void * ); #endif public: - SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ); + SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ); void Construct(); Modified: openoffice/branches/alg_writerframes/main/cui/source/tabpages/tabarea.hrc URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/cui/source/tabpages/tabarea.hrc?rev=1557768&r1=1557767&r2=1557768&view=diff ============================================================================== --- openoffice/branches/alg_writerframes/main/cui/source/tabpages/tabarea.hrc (original) +++ openoffice/branches/alg_writerframes/main/cui/source/tabpages/tabarea.hrc Mon Jan 13 16:49:19 2014 @@ -142,6 +142,8 @@ #define RBT_COLUMN 7 #define MTR_FLD_OFFSET 3 #define GRP_OFFSET 8 +//UUUU +#define BTN_IMPORTOPTIONAL 1 #define FT_TRANSPARENT 9 #define FT_X_SIZE 10 Modified: openoffice/branches/alg_writerframes/main/cui/source/tabpages/tabarea.src URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/cui/source/tabpages/tabarea.src?rev=1557768&r1=1557767&r2=1557768&view=diff ============================================================================== --- openoffice/branches/alg_writerframes/main/cui/source/tabpages/tabarea.src (original) +++ openoffice/branches/alg_writerframes/main/cui/source/tabpages/tabarea.src Mon Jan 13 16:49:19 2014 @@ -571,6 +571,15 @@ TabPage RID_SVXPAGE_AREA Last = 100 ; SpinSize = 5 ; }; + //UUUU + PushButton BTN_IMPORTOPTIONAL + { + HelpID = "cui:PushButton:MD_ICONSELECTOR:BTN_IMPORTOPTIONAL"; + Pos = MAP_APPFONT ( 132 + 12, 157 + 6 ) ; + Size = MAP_APPFONT ( 100 , 14 ) ; + TabStop = TRUE ; + Text[ en-US ] = "Import Graphic..."; + }; }; // RID_SVXPAGE_SHADOW ------------------------------------------------------ TabPage RID_SVXPAGE_SHADOW Modified: openoffice/branches/alg_writerframes/main/cui/source/tabpages/tparea.cxx URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/cui/source/tabpages/tparea.cxx?rev=1557768&r1=1557767&r2=1557768&view=diff ============================================================================== --- openoffice/branches/alg_writerframes/main/cui/source/tabpages/tparea.cxx (original) +++ openoffice/branches/alg_writerframes/main/cui/source/tabpages/tparea.cxx Mon Jan 13 16:49:19 2014 @@ -54,6 +54,11 @@ #include <svl/intitem.hxx> //add CHINA001 #include <sfx2/request.hxx>//add CHINA001 #include "paragrph.hrc" + +//UUUU +#include "sfx2/opengrf.hxx" +#include <vcl/msgbox.hxx> + #define DLGWIN this->GetParent()->GetParent() // static ---------------------------------------------------------------- @@ -248,8 +253,10 @@ void SvxTransparenceTabPage::SetControlS } SvxTransparenceTabPage::SvxTransparenceTabPage(Window* pParent, const SfxItemSet& rInAttrs) -: SvxTabPage ( pParent, CUI_RES( RID_SVXPAGE_TRANSPARENCE ), rInAttrs), +: SvxTabPage ( pParent, CUI_RES( RID_SVXPAGE_TRANSPARENCE ), rInAttrs), rOutAttrs ( rInAttrs ), + eRP ( RP_MM ), + nPageType(0), nDlgType(0), @@ -616,9 +623,8 @@ void SvxTransparenceTabPage::PageCreated |* \************************************************************************/ -SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : - - SvxTabPage ( pParent, CUI_RES( RID_SVXPAGE_AREA ), rInAttrs ), +SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) +: SvxTabPage ( pParent, CUI_RES( RID_SVXPAGE_AREA ), rInAttrs ), aFlProp ( this, CUI_RES( FL_PROP ) ), aTypeLB ( this, CUI_RES( LB_AREA_TYPE ) ), @@ -659,15 +665,43 @@ SvxAreaTabPage::SvxAreaTabPage( Window* aCtlXRectPreview ( this, CUI_RES( CTL_COLOR_PREVIEW ) ), rOutAttrs ( rInAttrs ), + eRP ( RP_MM ), maColorTab(), maGradientList(), maHatchingList(), maBitmapList(), + // local fixed not o be changed values for local pointers + maFixed_ChangeType(CT_NONE), + maFixed_sal_Bool(false), + + // init with pointers to fixed ChangeType + pnColorTableState(&maFixed_ChangeType), + pnBitmapListState(&maFixed_ChangeType), + pnGradientListState(&maFixed_ChangeType), + pnHatchingListState(&maFixed_ChangeType), + + nPageType(0), + nDlgType(0), + nPos(0), + + // init with pointer to fixed bool + pbAreaTP(&maFixed_sal_Bool), + pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ), aXFillAttr ( pXPool ), - rXFSet ( aXFillAttr.GetItemSet() ) + rXFSet ( aXFillAttr.GetItemSet() ), + + ePoolUnit(SFX_MAPUNIT_100TH_MM), + eFUnit(FUNIT_NONE), + + //UUUU + mbOfferImportButton(false), + mbPositionsAdapted(false), + mbDirectGraphicSet(false), + maDirectGraphic(), + maBtnImport(this, CUI_RES(BTN_IMPORTOPTIONAL)) { FreeResource(); @@ -683,6 +717,8 @@ SvxAreaTabPage::SvxAreaTabPage( Window* aTsbStepCount.Hide(); aNumFldStepCount.Hide(); + //UUUU + maBtnImport.Hide(); aTsbTile.Hide(); aTsbStretch.Hide(); aTsbScale.Hide(); @@ -702,6 +738,7 @@ SvxAreaTabPage::SvxAreaTabPage( Window* aFtYOffset.Hide(); aMtrFldYOffset.Hide(); aFlPosition.Hide(); + // Controls for Hatch-Background aCbxHatchBckgrd.Hide(); aLbHatchBckgrdColor.Hide(); @@ -754,6 +791,10 @@ SvxAreaTabPage::SvxAreaTabPage( Window* aNumFldStepCount.SetModifyHdl( LINK( this, SvxAreaTabPage, ModifyStepCountHdl_Impl ) ); + //UUUU + maBtnImport.SetClickHdl(LINK(this, SvxAreaTabPage, ClickImportHdl_Impl)); + maBtnImport.SetAccessibleRelationMemberOf(&aFlProp); + Link aLink( LINK( this, SvxAreaTabPage, ModifyTileHdl_Impl ) ); aTsbTile.SetClickHdl( aLink ); aTsbStretch.SetClickHdl( aLink ); @@ -1124,33 +1165,44 @@ sal_Bool SvxAreaTabPage::FillItemSet( Sf break; case XFILL_BITMAP: { - nPos = aLbBitmap.GetSelectEntryPos(); - if( nPos != LISTBOX_ENTRY_NOTFOUND && - nPos != aLbBitmap.GetSavedValue() ) + //UUUU + if(mbDirectGraphicSet && GRAPHIC_NONE != maDirectGraphic.GetType()) { - const XBitmapEntry* pXBitmapEntry = maBitmapList->GetBitmap(nPos); - const String aString(aLbBitmap.GetSelectEntry()); - const XFillBitmapItem aFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject()); - pOld = GetOldItem( rAttrs, XATTR_FILLBITMAP ); - if ( !pOld || !( *(const XFillBitmapItem*)pOld == aFillBitmapItem ) ) - { - rAttrs.Put( aFillBitmapItem ); - bModified = sal_True; - } + const XFillBitmapItem aXBmpItem(maDirectName, maDirectGraphic); + rAttrs.Put(XFillStyleItem(XFILL_BITMAP)); + rAttrs.Put(aXBmpItem); + bModified = sal_True; } - // NEU - if( (eSavedStyle != eStyle) && - ( bModified || - SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), sal_True ) ) ) + else { - XFillStyleItem aStyleItem( XFILL_BITMAP ); - pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE ); - if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) + nPos = aLbBitmap.GetSelectEntryPos(); + if( nPos != LISTBOX_ENTRY_NOTFOUND && + nPos != aLbBitmap.GetSavedValue() ) { - rAttrs.Put( aStyleItem ); - bModified = sal_True; + const XBitmapEntry* pXBitmapEntry = maBitmapList->GetBitmap(nPos); + const String aString(aLbBitmap.GetSelectEntry()); + const XFillBitmapItem aFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject()); + pOld = GetOldItem( rAttrs, XATTR_FILLBITMAP ); + if ( !pOld || !( *(const XFillBitmapItem*)pOld == aFillBitmapItem ) ) + { + rAttrs.Put( aFillBitmapItem ); + bModified = sal_True; + } } - } + // NEU + if( (eSavedStyle != eStyle) && + ( bModified || + SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), sal_True ) ) ) + { + XFillStyleItem aStyleItem( XFILL_BITMAP ); + pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE ); + if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) + { + rAttrs.Put( aStyleItem ); + bModified = sal_True; + } + } + } } break; } @@ -1778,6 +1830,8 @@ IMPL_LINK( SvxAreaTabPage, SelectDialogT IMPL_LINK( SvxAreaTabPage, ClickInvisibleHdl_Impl, void *, EMPTYARG ) { + //UUUU + maBtnImport.Hide(); aTsbTile.Hide(); aTsbStretch.Hide(); aTsbScale.Hide(); @@ -1827,6 +1881,8 @@ IMPL_LINK( SvxAreaTabPage, ClickInvisibl IMPL_LINK( SvxAreaTabPage, ClickColorHdl_Impl, void *, EMPTYARG ) { + //UUUU + maBtnImport.Hide(); aTsbTile.Hide(); aTsbStretch.Hide(); aTsbScale.Hide(); @@ -1915,6 +1971,8 @@ IMPL_LINK( SvxAreaTabPage, ModifyColorHd IMPL_LINK( SvxAreaTabPage, ClickGradientHdl_Impl, void *, EMPTYARG ) { + //UUUU + maBtnImport.Hide(); aTsbTile.Hide(); aTsbStretch.Hide(); aTsbScale.Hide(); @@ -2023,6 +2081,8 @@ IMPL_LINK( SvxAreaTabPage, ClickHatching aTsbStepCount.Hide(); aNumFldStepCount.Hide(); + //UUUU + maBtnImport.Hide(); aTsbTile.Hide(); aTsbStretch.Hide(); aTsbScale.Hide(); @@ -2197,6 +2257,50 @@ IMPL_LINK( SvxAreaTabPage, ClickBitmapHd aCbxHatchBckgrd.Hide(); aLbHatchBckgrdColor.Hide(); + //UUUU + if(mbOfferImportButton) + { + maBtnImport.Show(); + maBtnImport.Enable(); + } + else + { + maBtnImport.Hide(); + maBtnImport.Disable(); + } + + if(mbOfferImportButton && !mbPositionsAdapted) + { + //UUUU adapt positions only once in dialogs lifetime + mbPositionsAdapted = true; + + // adapt in y from position of FL_SIZE MAP_APPFONT(3) to position of MTR_FLD_OFFSET MAP_APPFONT(157) + const sal_uInt32 nOrigStartY(aFlSize.GetPosPixel().Y()); + const sal_uInt32 nOrigHeight(aMtrFldOffset.GetPosPixel().Y() - nOrigStartY); + const sal_uInt32 nBtnImportHeight(maBtnImport.GetSizePixel().Height()); + const sal_uInt32 nNewHeight(nOrigHeight - nBtnImportHeight); + + aFlSize.SetPosPixel(Point(aFlSize.GetPosPixel().X(), nOrigStartY + (((aFlSize.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight))); + aTsbOriginal.SetPosPixel(Point(aTsbOriginal.GetPosPixel().X(), nOrigStartY + (((aTsbOriginal.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight))); + aTsbScale.SetPosPixel(Point(aTsbScale.GetPosPixel().X(), nOrigStartY + (((aTsbScale.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight))); + aFtXSize.SetPosPixel(Point(aFtXSize.GetPosPixel().X(), nOrigStartY + (((aFtXSize.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight))); + aMtrFldXSize.SetPosPixel(Point(aMtrFldXSize.GetPosPixel().X(), nOrigStartY + (((aMtrFldXSize.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight))); + aFtYSize.SetPosPixel(Point(aFtYSize.GetPosPixel().X(), nOrigStartY + (((aFtYSize.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight))); + aMtrFldYSize.SetPosPixel(Point(aMtrFldYSize.GetPosPixel().X(), nOrigStartY + (((aMtrFldYSize.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight))); + aFlPosition.SetPosPixel(Point(aFlPosition.GetPosPixel().X(), nOrigStartY + (((aFlPosition.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight))); + aCtlPosition.SetPosPixel(Point(aCtlPosition.GetPosPixel().X(), nOrigStartY + (((aCtlPosition.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight))); + aFtXOffset.SetPosPixel(Point(aFtXOffset.GetPosPixel().X(), nOrigStartY + (((aFtXOffset.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight))); + aMtrFldXOffset.SetPosPixel(Point(aMtrFldXOffset.GetPosPixel().X(), nOrigStartY + (((aMtrFldXOffset.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight))); + aFtYOffset.SetPosPixel(Point(aFtYOffset.GetPosPixel().X(), nOrigStartY + (((aFtYOffset.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight))); + aMtrFldYOffset.SetPosPixel(Point(aMtrFldYOffset.GetPosPixel().X(), nOrigStartY + (((aMtrFldYOffset.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight))); + aTsbTile.SetPosPixel(Point(aTsbTile.GetPosPixel().X(), nOrigStartY + (((aTsbTile.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight))); + aTsbStretch.SetPosPixel(Point(aTsbStretch.GetPosPixel().X(), nOrigStartY + (((aTsbStretch.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight))); + aFlOffset.SetPosPixel(Point(aFlOffset.GetPosPixel().X(), nOrigStartY + (((aFlOffset.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight))); + aRbtRow.SetPosPixel(Point(aRbtRow.GetPosPixel().X(), nOrigStartY + (((aRbtRow.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight))); + aRbtColumn.SetPosPixel(Point(aRbtColumn.GetPosPixel().X(), nOrigStartY + (((aRbtColumn.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight))); + aMtrFldOffset.SetPosPixel(Point(aMtrFldOffset.GetPosPixel().X(), nOrigStartY + (((aMtrFldOffset.GetPosPixel().Y() - nOrigStartY) * nNewHeight) / nOrigHeight))); + } + aTsbTile.Show(); aTsbStretch.Show(); aTsbScale.Show(); @@ -2244,6 +2348,11 @@ IMPL_LINK( SvxAreaTabPage, ClickBitmapHd IMPL_LINK( SvxAreaTabPage, ModifyBitmapHdl_Impl, void *, EMPTYARG ) { + //UUUU + mbDirectGraphicSet = false; + maDirectGraphic.Clear(); + maDirectName = String(); + const SfxPoolItem* pPoolItem = NULL; sal_uInt16 _nPos = aLbBitmap.GetSelectEntryPos(); if( _nPos != LISTBOX_ENTRY_NOTFOUND ) @@ -2320,6 +2429,48 @@ IMPL_LINK( SvxAreaTabPage, ModifyStepCou //------------------------------------------------------------------------ +IMPL_LINK( SvxAreaTabPage, ClickImportHdl_Impl, void *, EMPTYARG ) +{ + ResMgr& rMgr = CUI_MGR(); + SvxOpenGraphicDialog aDlg(UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Import"))); + aDlg.EnableLink(sal_False); + + if(!aDlg.Execute()) + { + EnterWait(); + const int nError(aDlg.GetGraphic(maDirectGraphic)); + LeaveWait(); + + if(!nError && GRAPHIC_NONE != maDirectGraphic.GetType()) + { + // extract name from filename + const INetURLObject aURL(aDlg.GetPath()); + maDirectName = String(aURL.GetName()).GetToken( 0, '.' ); + + // use loaded graphic + const XFillBitmapItem aXBmpItem(maDirectName, maDirectGraphic); + rXFSet.Put(XFillStyleItem(XFILL_BITMAP)); + rXFSet.Put(aXBmpItem); + + // trigger state flag for directly loaded graphic + mbDirectGraphicSet = true; + + // preview + aCtlBitmapPreview.SetAttributes(aXFillAttr.GetItemSet()); + aCtlBitmapPreview.Invalidate(); + } + else + { + // graphic could not be loaded + ErrorBox(DLGWIN, WinBits(WB_OK), String(ResId(RID_SVXSTR_READ_DATA_ERROR, rMgr))).Execute(); + } + } + + return 0L; +} + +//------------------------------------------------------------------------ + IMPL_LINK( SvxAreaTabPage, ModifyTileHdl_Impl, void *, EMPTYARG ) { TriState eState = aTsbTile.GetState(); @@ -2604,6 +2755,8 @@ void SvxAreaTabPage::PageCreated (SfxAll SFX_ITEMSET_ARG (&aSet,pPageTypeItem,SfxUInt16Item,SID_PAGE_TYPE,sal_False); SFX_ITEMSET_ARG (&aSet,pDlgTypeItem,SfxUInt16Item,SID_DLG_TYPE,sal_False); SFX_ITEMSET_ARG (&aSet,pPosItem,SfxUInt16Item,SID_TABPAGE_POS,sal_False); + //UUUU + SFX_ITEMSET_ARG (&aSet, pOfferImportItem, SfxBoolItem, SID_OFFER_IMPORT, sal_False); if (pColorTabItem) SetColorTable(pColorTabItem->GetColorTable()); @@ -2619,6 +2772,19 @@ void SvxAreaTabPage::PageCreated (SfxAll SetDlgType(pDlgTypeItem->GetValue()); if (pPosItem) SetPos(pPosItem->GetValue()); + + //UUUU + if(pOfferImportItem) + { + const bool bNew(pOfferImportItem->GetValue()); + + if(mbOfferImportButton != bNew) + { + mbOfferImportButton = bNew; + } + } + Construct(); } +//eof Modified: openoffice/branches/alg_writerframes/main/svx/inc/svx/svxids.hrc URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/svx/inc/svx/svxids.hrc?rev=1557768&r1=1557767&r2=1557768&view=diff ============================================================================== --- openoffice/branches/alg_writerframes/main/svx/inc/svx/svxids.hrc (original) +++ openoffice/branches/alg_writerframes/main/svx/inc/svx/svxids.hrc Mon Jan 13 16:49:19 2014 @@ -413,13 +413,19 @@ #define SID_ATTR_ZOOM ( SID_SVX_START + 0 ) +// CAUTION! Range <1 .. 22> used by EditEngine (!) + #define SID_ATTR_BORDER_INNER ( SID_SVX_START + 23 ) +// CAUTION! Range <24 .. 43> used by EditEngine (!) #define SID_ATTR_POSTIT_AUTHOR ( SID_SVX_START + 44 ) #define SID_ATTR_POSTIT_DATE ( SID_SVX_START + 45 ) #define SID_ATTR_POSTIT_TEXT ( SID_SVX_START + 46 ) #define SID_ATTR_SEARCH ( SID_SVX_START + 47 ) + +// CAUTION! Range <48 .. 49> used by EditEngine (!) + #define SID_ATTR_PAGE ( SID_SVX_START + 50 ) #define SID_ATTR_PAGE_SIZE ( SID_SVX_START + 51 ) #define SID_ATTR_PAGE_MAXSIZE ( SID_SVX_START + 52 ) @@ -433,6 +439,9 @@ #define SID_ATTR_PAGE_DYNAMIC ( SID_SVX_START + 61 ) #define SID_ATTR_PAGE_SHARED ( SID_SVX_START + 62 ) #define SID_ATTR_PAGE_BSP ( SID_SVX_START + 63 ) + +// CAUTION! Range <64 .. 67> used by EditEngine (!) + #define SID_ATTR_DBSESS_SERVERTYPE ( SID_SVX_START + 70 ) #define SID_ATTR_DBSESS_SERVEROPTS ( SID_SVX_START + 71 ) #define SID_ATTR_DBSESS_USERNAME ( SID_SVX_START + 72 ) @@ -608,6 +617,9 @@ #define SID_SPELL_DIALOG ( SID_SVX_START + 243 ) #define SID_INSERT_DRAW ( SID_SVX_START + 244 ) #define SID_THESAURUS ( SID_SVX_START + 245 ) + +// CAUTION! Range <250 .. 250> used by EditEngine (!) + #define SID_AUTOCOMPLETEWORD ( SID_SVX_START + 251 ) #define SID_DRAW_TEXT ( SID_SVX_START + 253 ) #define SID_DRAW_CAPTION ( SID_SVX_START + 254 ) @@ -655,6 +667,9 @@ #define SID_PARA_DLG ( SID_SVX_START + 297 ) #define SID_ATTR_GRID_OPTIONS ( SID_SVX_START + 298 ) #define SID_ATTR_FILL_SHADOW ( SID_SVX_START + 299 ) + +// CAUTION! Range <300 .. 300> used by EditEngine (!) + #define SID_ATTR_LINEEND_STYLE ( SID_SVX_START + 301 ) #define SID_ATTR_TRANSFORM_SLANT ( SID_SVX_START + 302 ) // !!! #define SID_ATTR_TRANSFORM_SHEAR ( SID_SVX_START + 304 ) @@ -704,6 +719,9 @@ //#define SID_HYPERLINK_INSERT ( SID_SVX_START + 360 ) -> sfxsids.hrc //#define SID_HYPERLINK_GETLINK ( SID_SVX_START + 361 ) -> sfxsids.hrc //#define SID_HYPERLINK_SETLINK ( SID_SVX_START + 362 ) -> sfxsids.hrc + +// CAUTION! Range <363 .. 363> used by EditEngine (!) + #define SID_NO_GRAPHICS ( SID_SVX_START + 364 ) #define SID_IMPORT_GRAPH_LASTURL ( SID_SVX_START + 365 ) //#define SID_NAVIGATOR ( SID_SVX_START + 366 ) -> sfxsids.hrc @@ -753,7 +771,7 @@ #define SID_ATTR_3D_AMBIENTCOLOR ( SID_SVX_START + 411 ) #define SID_IMPORT_GRAPH_LINK ( SID_SVX_START + 412 ) -//#define SID_ATTR_PARA_REGISTER ( SID_SVX_START + 413 ) -> editids.hrc +// CAUTION! Range <413 .. 413> used by EditEngine (!) //! moved to sfx2, still in use: //#define SID_HTML_MODE ( SID_SVX_START + 414 ) @@ -803,6 +821,9 @@ #define SID_GROUP ( SID_SVX_START + 454 ) #define SID_UNGROUP ( SID_SVX_START + 455 ) #define SID_SET_DEFAULT ( SID_SVX_START + 456 ) + +// CAUTION! Range <457 .. 457> used by EditEngine (!) + #define SID_BEZIER ( SID_SVX_START + 458 ) #define SID_ATTR_3D_DOUBLE_SIDED ( SID_SVX_START + 459 ) #define SID_ATTR_ALIGN_INDENT ( SID_SVX_START + 460 ) @@ -857,10 +878,15 @@ #define SID_TAB_REMOVE_ALL ( SID_SVX_START + 583 ) #define SID_TAB_REMOVE_BY_INDEX ( SID_SVX_START + 584 ) #define SID_OFA_VW_CREATE ( SID_SVX_START + 585 ) + +// CAUTION! Range <587 .. 587> used by EditEngine (!) + #define SID_OFA_REL_DESIGNVIEW ( SID_SVX_START + 588 ) #define SID_OFA_MANUAL_SQL ( SID_SVX_START + 589 ) #define SID_PARA_BACKGRND_DESTINATION ( SID_SVX_START + 590 ) +// CAUTION! Range <591 .. 591> used by EditEngine (!) + #define SID_FMSLOTS_START ( SID_SVX_START + 592 ) #define SID_FM_CONFIG ( SID_SVX_START + 593 ) #define SID_FM_PUSHBUTTON ( SID_SVX_START + 594 ) @@ -1051,6 +1077,9 @@ #define SID_HLINKBAR_BOOKMARK ( SID_SVX_START + 852 ) #define SID_HLINKBAR_SEARCH ( SID_SVX_START + 853 ) #define SID_HLINKBAR_TARGET ( SID_SVX_START + 854 ) + +// CAUTION! Range <855 .. 855> used by EditEngine (!) + #define SID_PARAM_NUM_PRESET ( SID_SVX_START + 856 ) #define SID_PARAM_CUR_NUMBER ( SID_SVX_START + 857 ) #define SID_PARAM_CHILD_LEVELS ( SID_SVX_START + 858 ) @@ -1069,17 +1098,29 @@ #define SID_ATTR_GRAF_RESERVE3 ( SID_SVX_START + 873 ) #define SID_ATTR_GRAF_RESERVE4 ( SID_SVX_START + 874 ) #define SID_ATTR_GRAF_RESERVE5 ( SID_SVX_START + 875 ) + +// CAUTION! Range <877 .. 877> used by EditEngine (!) + //#define SID_COMP_BIBLIOGRAPHY ( SID_SVX_START + 880 ) -> sfxsids.hrc #define SID_ATTR_GRAF_KEEP_ZOOM ( SID_SVX_START + 882 ) #define SID_ATTR_GRAF_CROP ( SID_SVX_START + 883 ) #define SID_ATTR_GRAF_FRMSIZE ( SID_SVX_START + 884 ) #define SID_ATTR_GRAF_FRMSIZE_PERCENT ( SID_SVX_START + 885 ) #define SID_ATTR_GRAF_GRAPHIC ( SID_SVX_START + 886 ) + +// CAUTION! Range <887 .. 903> used by EditEngine (!) + #define SID_ASIAN_DLG ( SID_SVX_START + 904 ) #define SID_DRAW_TEXT_VERTICAL SID_ATTR_CHAR_VERTICAL + +// CAUTION! Range <905 .. 905> used by EditEngine (!) + #define SID_DRAW_CAPTION_VERTICAL ( SID_SVX_START + 906 ) #define SID_TEXTDIRECTION_LEFT_TO_RIGHT ( SID_SVX_START + 907 ) #define SID_TEXTDIRECTION_TOP_TO_BOTTOM ( SID_SVX_START + 908 ) + +// CAUTION! Range <910 .. 911> used by EditEngine (!) + #define SID_TRANSLITERATE_UPPER ( SID_SVX_START + 912 ) #define SID_TRANSLITERATE_LOWER ( SID_SVX_START + 913 ) #define SID_TRANSLITERATE_HALFWIDTH ( SID_SVX_START + 914 ) @@ -1087,10 +1128,15 @@ #define SID_TRANSLITERATE_HIRAGANA ( SID_SVX_START + 916 ) #define SID_TRANSLITERATE_KATAGANA ( SID_SVX_START + 917 ) #define SID_MN_SUB_TRANSLITERATE ( SID_SVX_START + 918 ) + +// CAUTION! Range <919 .. 920> used by EditEngine (!) + #define SID_LANGUAGE_OPTIONS ( SID_SVX_START + 921 ) #define SID_GETUNDOSTRINGS ( SID_SVX_START + 923 ) #define SID_GETREDOSTRINGS ( SID_SVX_START + 924 ) +// CAUTION! Range <925 .. 925> used by EditEngine (!) + #define SID_INSERT_IMAGECONTROL ( SID_SVX_START + 926 ) #define SID_INSERT_PROGRESSBAR ( SID_SVX_START + 927 ) #define SID_INSERT_HFIXEDLINE ( SID_SVX_START + 928 ) @@ -1109,9 +1155,18 @@ #define SID_INSERT_PATTERNFIELD ( SID_SVX_START + 941 ) #define SID_INSERT_FILECONTROL ( SID_SVX_START + 942 ) #define SID_SHOW_PROPERTYBROWSER ( SID_SVX_START + 943 ) + +// CAUTION! Range <944 .. 945> used by EditEngine (!) + #define SID_ATTR_TABSTOP_VERTICAL ( SID_SVX_START + 946 ) + +// CAUTION! Range <947 .. 947> used by EditEngine (!) + #define SID_RULER_BORDERS_VERTICAL ( SID_SVX_START + 948 ) #define SID_ATTR_ALIGN_ASIANVERTICAL ( SID_SVX_START + 949 ) + +// CAUTION! Range <950 .. 951> used by EditEngine (!) + #define SID_RULER_TEXT_RIGHT_TO_LEFT ( SID_SVX_START + 952 ) #define SID_ATTR_HDFT_DYNAMIC_SPACING ( SID_SVX_START + 953 ) #define SID_ATTR_NUMBERFORMAT_ADD_AUTO ( SID_SVX_START + 954 ) @@ -1149,10 +1204,16 @@ #define SID_FONTWORK_KERN_CHARACTER_PAIRS ( SID_SVX_START + 986 ) #define SID_DRAW_FONTWORK ( SID_SVX_START + 987 ) #define SID_DRAW_FONTWORK_VERTICAL ( SID_SVX_START + 988 ) + +// CAUTION! Range <989 .. 989> used by EditEngine (!) + #define SID_ATTR_BORDER_CONNECT ( SID_SVX_START + 990 ) #define SID_SW_FOLLOW_TEXT_FLOW ( SID_SVX_START + 991 ) /* #i18732# - slot-id for new option IsFollowingTextFlow' */ #define SID_RULER_ROWS ( SID_SVX_START + 992 ) #define SID_RULER_ROWS_VERTICAL ( SID_SVX_START + 993 ) + +// CAUTION! Range <994 .. 998> used by EditEngine (!) + #define SID_ATTR_TRANSFORM_HORI_POSITION ( SID_SVX_START + 999 ) #define SID_ATTR_TRANSFORM_VERT_POSITION ( SID_SVX_START + 1000 ) #define SID_SHOW_ITEMBROWSER ( SID_SVX_START + 1001 ) @@ -1249,6 +1310,8 @@ #define SID_CHAR_DLG_PREVIEW_STRING (SID_SVX_START+1090) #define SID_RECHECK_DOCUMENT (SID_SVX_START+1091) +// CAUTION! Range <1092 .. 1092> used by EditEngine (!) + #define SID_OBJECT_MIRROR (SID_SVX_START+1093) #define SID_DELETE_POSTIT (SID_SVX_START+1094) @@ -1280,8 +1343,11 @@ #define FN_SVX_SET_NUMBER (SID_SVX_START + 1117) #define FN_SVX_SET_BULLET (SID_SVX_START + 1118) +//UUUU +#define SID_OFFER_IMPORT ( SID_SVX_START + 1119) + // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id -#define SID_SVX_FIRSTFREE (FN_SVX_SET_BULLET + 1) +#define SID_SVX_FIRSTFREE (SID_OFFER_IMPORT + 1) // -------------------------------------------------------------------------- // Overflow check for slot IDs Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/fmtui/tmpdlg.cxx URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/fmtui/tmpdlg.cxx?rev=1557768&r1=1557767&r2=1557768&view=diff ============================================================================== --- openoffice/branches/alg_writerframes/main/sw/source/ui/fmtui/tmpdlg.cxx (original) +++ openoffice/branches/alg_writerframes/main/sw/source/ui/fmtui/tmpdlg.cxx Mon Jan 13 16:49:19 2014 @@ -644,13 +644,23 @@ void SwTemplateDlg::PageCreated( sal_uIn break; //UUUU inits for Area and Transparency TabPages - // the selection attribute lists (XPropertyList derivates, e.g. XColorList for + // The selection attribute lists (XPropertyList derivates, e.g. XColorList for // the color table) need to be added as items (e.g. SvxColorTableItem) to make - // these pages find the needed attributes for fill style suggestions. These are - // added in SwDocStyleSheet::GetItemSet() for the SFX_STYLE_FAMILY_PARA on demand + // these pages find the needed attributes for fill style suggestions. + // These are added in SwDocStyleSheet::GetItemSet() for the SFX_STYLE_FAMILY_PARA on + // demand, but could also be directly added from the DrawModel. case RID_SVXPAGE_AREA: { - rPage.PageCreated(GetStyleSheet().GetItemSet()); + SfxItemSet aNew(*aSet.GetPool(), + SID_COLOR_TABLE, SID_BITMAP_LIST, + SID_OFFER_IMPORT, SID_OFFER_IMPORT, 0, 0); + + aNew.Put(GetStyleSheet().GetItemSet()); + + // add flag for direct graphic content selection + aNew.Put(SfxBoolItem(SID_OFFER_IMPORT, true)); + + rPage.PageCreated(aNew); } break; @@ -662,5 +672,4 @@ void SwTemplateDlg::PageCreated( sal_uIn } } - - +// eof Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/frmdlg/frmdlg.cxx URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/frmdlg/frmdlg.cxx?rev=1557768&r1=1557767&r2=1557768&view=diff ============================================================================== --- openoffice/branches/alg_writerframes/main/sw/source/ui/frmdlg/frmdlg.cxx (original) +++ openoffice/branches/alg_writerframes/main/sw/source/ui/frmdlg/frmdlg.cxx Mon Jan 13 16:49:19 2014 @@ -226,9 +226,23 @@ void SwFrmDlg::PageCreated( sal_uInt16 n break; //UUUU inits for Area and Transparency TabPages + // The selection attribute lists (XPropertyList derivates, e.g. XColorList for + // the color table) need to be added as items (e.g. SvxColorTableItem) to make + // these pages find the needed attributes for fill style suggestions. + // These are set in preparation to trigger this dialog (FN_FORMAT_FRAME_DLG and + // FN_DRAW_WRAP_DLG), but could also be directly added from the DrawModel. case RID_SVXPAGE_AREA: { - rPage.PageCreated(m_rSet); + SfxItemSet aNew(*GetInputSetImpl()->GetPool(), + SID_COLOR_TABLE, SID_BITMAP_LIST, + SID_OFFER_IMPORT, SID_OFFER_IMPORT, 0, 0); + + aNew.Put(m_rSet); + + // add flag for direct graphic content selection + aNew.Put(SfxBoolItem(SID_OFFER_IMPORT, true)); + + rPage.PageCreated(aNew); } break; @@ -240,3 +254,4 @@ void SwFrmDlg::PageCreated( sal_uInt16 n } } +// eof