diff options
author | Armin Le Grand <alg@apache.org> | 2014-07-14 19:09:11 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2014-07-14 19:09:11 +0000 |
commit | 3c1d4742e649fe9c8aed8c2817fe3e1f3364f298 (patch) | |
tree | e0c6e02c89aa9227726c9469da1001b3e29c41df /cui | |
parent | c5c31e2aeaedbdf76e1f38d3c385e34f5ed875ca (diff) |
Resync to trunk, windows non-pro build
aoo/aw080
Diffstat (limited to 'cui')
28 files changed, 460 insertions, 195 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 1b3e2e9355c2..23893e9b4f2a 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -615,7 +615,7 @@ void SfxAccCfgLBoxString_Impl::Paint(const Point& aPos , sal_uInt16 /*nFlags*/, SvLBoxEntry* pEntry ) { - /*/ ??? realy needed !!! + /*/ ??? really needed !!! Font aOldFont(rDevice.GetFont()); Font aNewFont(aOldFont ); rDevice.SetFont( aFont ); diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 277a2c70c0b6..5d504dfdc913 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -4209,7 +4209,7 @@ void ToolbarSaveInData::Reset() } catch ( uno::Exception& ) { - // error occured removing the settings + // error occurred removing the settings // TODO - add error dialog in future? } } @@ -4402,7 +4402,7 @@ void ToolbarSaveInData::RemoveToolbar( SvxConfigEntry* pToolbar ) } catch ( uno::Exception& ) { - // error occured removing the settings + // error occurred removing the settings } } diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 6ba8871595b7..6c95a20b62b2 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -397,7 +397,7 @@ void SpellDialog::SpellContinue_Impl(bool bUseSavedSentence, bool bIgnoreCurrent { //initially or after the last error of a sentence MarkNextError will fail //then GetNextSentence() has to be called followed again by MarkNextError() - //MarkNextError is not initally called if the UndoEdit mode is active + //MarkNextError is not initially called if the UndoEdit mode is active bool bNextSentence = false; if((!aSentenceED.IsUndoEditMode() && aSentenceED.MarkNextError( bIgnoreCurrentError )) || true == ( bNextSentence = GetNextSentence_Impl(bUseSavedSentence, aSentenceED.IsUndoEditMode()) && aSentenceED.MarkNextError( false ))) diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 13b87e3f49ea..a5151d3c4f65 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -554,7 +554,7 @@ void AboutDialog::Paint( const Rectangle& rRect ) SetClipRegion( rRect ); // workaround to ensure that the background is painted correct - // on MacOS for exmaple the background was grey and the image and other controls white + // on MacOS for example the background was grey and the image and other controls white SetFillColor(GetSettings().GetStyleSettings().GetWindowColor()); SetLineColor(); DrawRect(rRect); diff --git a/cui/source/dialogs/commonlingui.hxx b/cui/source/dialogs/commonlingui.hxx index 53b6cea87355..b787bbee9f7f 100644 --- a/cui/source/dialogs/commonlingui.hxx +++ b/cui/source/dialogs/commonlingui.hxx @@ -119,7 +119,7 @@ public: // users of this class may want to insert own controls in some places, where the ordinary // Z-Order determined by construction time is not sufficient // Use the following methods for this - enum ControlGroup // control groups in this window which cannot be devided (e.g. are adjacent in the Z order) + enum ControlGroup // control groups in this window which cannot be divided (e.g. are adjacent in the Z order) { eLeftRightWords, // the controls for the two words (original and suggestion), including the labels eSuggestionLabel, // the label for the suggestion diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 2d3bd0597371..81dde0675ed5 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -1552,7 +1552,7 @@ void SvxScriptOrgDialog::RestorePreviousSelection() } else if ( aException.getValueType() == ::getCppuType( ( const provider::ScriptFrameworkErrorException* ) NULL ) ) { - // A Script Framework error has occured + // A Script Framework error has occurred provider::ScriptFrameworkErrorException sfe; aException >>= sfe; return GetErrorMessage( sfe ); diff --git a/cui/source/dialogs/showcols.cxx b/cui/source/dialogs/showcols.cxx index dd34aba2b9ad..c4ec95a3174f 100644 --- a/cui/source/dialogs/showcols.cxx +++ b/cui/source/dialogs/showcols.cxx @@ -82,7 +82,7 @@ IMPL_LINK( FmShowColsDialog, OnClickedOk, Button*, EMPTYARG ) } catch(...) { - DBG_ERROR("FmShowColsDialog::OnClickedOk Exception occured!"); + DBG_ERROR("FmShowColsDialog::OnClickedOk Exception occurred!"); } } } @@ -123,7 +123,7 @@ void FmShowColsDialog::SetColumns(const ::com::sun::star::uno::Reference< ::com: } catch(...) { - DBG_ERROR("FmShowColsDialog::SetColumns Exception occured!"); + DBG_ERROR("FmShowColsDialog::SetColumns Exception occurred!"); } // if the col is hidden, put it into the list diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index f86a683a7df2..194d1c2031bd 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -1363,12 +1363,20 @@ AbstractSvxSearchSimilarityDialog * AbstractDialogFactory_Impl::CreateSvxSearchS return NULL; } -SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxBorderBackgroundDlg( Window* pParent, - const SfxItemSet& rCoreSet, - sal_Bool bEnableSelector) -{ - SfxTabDialog* pDlg = new SvxBorderBackgroundDlg( pParent, rCoreSet, bEnableSelector); - return new AbstractTabDialog_Impl( pDlg ); +//UUUU +SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxBorderBackgroundDlg( + Window* pParent, + const SfxItemSet& rCoreSet, + bool bEnableSelector, + bool bEnableDrawingLayerFillStyles) +{ + SfxTabDialog* pDlg = new SvxBorderBackgroundDlg( + pParent, + rCoreSet, + bEnableSelector, + bEnableDrawingLayerFillStyles); + + return new AbstractTabDialog_Impl(pDlg); } AbstractSvxTransformTabDialog* AbstractDialogFactory_Impl::CreateSvxTransformTabDialog( Window* pParent, diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index cdb579b87d23..39fb0b6fa53f 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -647,9 +647,14 @@ public: virtual AbstractFmShowColsDialog * CreateFmShowColsDialog( Window* pParent ); //add for FmShowColsDialog virtual AbstractSvxZoomDialog * CreateSvxZoomDialog( Window* pParent, //add for SvxZoomDialog const SfxItemSet& rCoreSet); - virtual SfxAbstractTabDialog* CreateSvxBorderBackgroundDlg( Window* pParent, //add for SvxBorderBackgroundDlg - const SfxItemSet& rCoreSet, - sal_Bool bEnableSelector = sal_False) ; + + //UUUU add for SvxBorderBackgroundDlg + virtual SfxAbstractTabDialog* CreateSvxBorderBackgroundDlg( + Window* pParent, + const SfxItemSet& rCoreSet, + bool bEnableSelector = false, + bool bEnableDrawingLayerFillStyles = false); + virtual AbstractSvxTransformTabDialog* CreateSvxTransformTabDialog( Window* pParent, //add for SvxTransformTabDialog const SfxItemSet* pAttr, const SdrView* pView, diff --git a/cui/source/inc/bbdlg.hxx b/cui/source/inc/bbdlg.hxx index fe2ac3416c00..51cb1baf65fe 100644 --- a/cui/source/inc/bbdlg.hxx +++ b/cui/source/inc/bbdlg.hxx @@ -34,17 +34,20 @@ class SvxBorderBackgroundDlg: public SfxTabDialog { public: - SvxBorderBackgroundDlg( Window *pParent, - const SfxItemSet& rCoreSet, - sal_Bool bEnableSelector = sal_False ); + SvxBorderBackgroundDlg(Window *pParent, + const SfxItemSet& rCoreSet, + bool bEnableSelector = false, + bool bEnableDrawingLayerFillStyles = false); ~SvxBorderBackgroundDlg(); protected: - virtual void PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ); + virtual void PageCreated(sal_uInt16 nPageId,SfxTabPage& rTabPage); private: - sal_Bool bEnableBackgroundSelector; // fuer Border/Background-Dlg + /// bitfield + bool mbEnableBackgroundSelector : 1; // fuer Border/Background-Dlg + bool mbEnableDrawingLayerFillStyles : 1; // for full DrawingLayer FillStyles }; diff --git a/cui/source/inc/cuihyperdlg.hxx b/cui/source/inc/cuihyperdlg.hxx index cae78241f1eb..f55ebdfa49cc 100644 --- a/cui/source/inc/cuihyperdlg.hxx +++ b/cui/source/inc/cuihyperdlg.hxx @@ -67,7 +67,7 @@ public : class SvxHpLinkDlg : public IconChoiceDialog { private: - SvxHlinkCtrl maCtrl; // Controler + SvxHlinkCtrl maCtrl; // Controller SfxBindings* mpBindings; SfxItemSet* mpItemSet; diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc index 7a0dac234d7b..17f5fc78b929 100755 --- a/cui/source/inc/cuires.hrc +++ b/cui/source/inc/cuires.hrc @@ -42,7 +42,11 @@ #define RID_SVXDLG_TEXT (RID_SVX_START + 183) #define RID_SVXDLG_TRANSFORM (RID_SVX_START + 45) #define RID_SVXDLG_LINE (RID_SVX_START + 50) -#define RID_SVXDLG_BBDLG (RID_SVX_START + 40) + +//UUUU +#define RID_SVXDLG_BBDLG_BACKGROUND (RID_SVX_START + 40) +#define RID_SVXDLG_BBDLG_AREA_TRANS (RID_SVX_START + 41) + #define RID_SVXDLG_CAPTION (RID_SVX_START + 151) #define RID_SVXDLG_AREA (RID_SVX_START + 55) #define RID_SVXSTRARY_PAPERSIZE_STD (RID_SVX_START + 142) diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx index 26f2f8a2ef63..64574c0f4e2e 100644 --- a/cui/source/inc/cuitabline.hxx +++ b/cui/source/inc/cuitabline.hxx @@ -131,7 +131,7 @@ private: //#58425# Symbole auf einer Linie (z.B. StarChart) -> SdrObjList* pSymbolList; //a list of symbols to be shown in menu. Symbol at position SID_ATTR_SYMBOLTYPE is to be shown in preview. The list position is to be used cyclic. bool bNewSize; - Graphic aAutoSymbolGraphic; //a graphic to be displayed in the preview in case that an automatic symbol is choosen + Graphic aAutoSymbolGraphic; //a graphic to be displayed in the preview in case that an automatic symbol is chosen long nNumMenuGalleryItems; long nSymbolType; SfxItemSet* pSymbolAttr; //attributes for the shown symbols; only necessary if not equal to line properties diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx index efc15e345169..5cb0930e0e05 100644 --- a/cui/source/inc/page.hxx +++ b/cui/source/inc/page.hxx @@ -80,7 +80,7 @@ <SvxLRSpaceItem>: <SID_ATTR_LRSPACE> */ -struct SvxPage_Impl; +//UUUU struct SvxPage_Impl; typedef sal_uInt16 MarginPosition; class SvxPageDescPage : public SfxTabPage @@ -88,6 +88,7 @@ class SvxPageDescPage : public SfxTabPage using TabPage::ActivatePage; using TabPage::DeactivatePage; +private: // paper format FixedLine aPaperSizeFl; FixedText aPaperFormatText; @@ -167,7 +168,14 @@ class SvxPageDescPage : public SfxTabPage Paper ePaperStart; Paper ePaperEnd; - SvxPage_Impl* pImpl; + //UUUU SvxPage_Impl* pImpl; + MarginPosition m_nPos; + Printer* mpDefPrinter; + + bool mbDelPrinter : 1; + + //UUUU + bool mbEnableDrawingLayerFillStyles : 1; #ifdef _SVX_PAGE_CXX void Init_Impl(); @@ -208,6 +216,9 @@ class SvxPageDescPage : public SfxTabPage SvxPageDescPage( Window* pParent, const SfxItemSet& rSet ); + //UUUU + void EnableDrawingLayerFillStyles(bool bNew) { mbEnableDrawingLayerFillStyles = bNew; } + protected: virtual void ActivatePage( const SfxItemSet& rSet ); virtual int DeactivatePage( SfxItemSet* pSet = 0 ); diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx index 9f3f155241d5..3e595c285262 100644 --- a/cui/source/inc/transfrm.hxx +++ b/cui/source/inc/transfrm.hxx @@ -134,7 +134,7 @@ private: bool mbSizeDisabled; bool mbAdjustDisabled; - // frome size + // from size // #i75273# double mfOldWidth; double mfOldHeight; diff --git a/cui/source/options/optcolor.hrc b/cui/source/options/optcolor.hrc index 809f04f19658..0e0cbd5ed02e 100644 --- a/cui/source/options/optcolor.hrc +++ b/cui/source/options/optcolor.hrc @@ -187,16 +187,16 @@ #define _FT_WIDTH 120 -#define _LINE_HEIGHT 15 +#define _LINE_HEIGHT 16 #define _FT_HEIGHT 10 #define _CB_WIDTH 130 #define _FT_XPOS 14 #define _CB_XPOS 6 -#define _LB_XPOS 139 -#define _LB_WIDTH 50 +#define _LB_XPOS 119 +#define _LB_WIDTH 70 #define _LB_HEIGHT 50 #define _WN_WIDTH 30 -#define _WN_HEIGHT 12 +#define _WN_HEIGHT 14 #define _WN_XPOS 195 #define FT_SMARTTAGS 168 diff --git a/cui/source/options/optcolor.src b/cui/source/options/optcolor.src index 4983f1f8b61c..04f0c7ad6526 100644 --- a/cui/source/options/optcolor.src +++ b/cui/source/options/optcolor.src @@ -49,7 +49,7 @@ TabPage RID_SVXPAGE_COLORCONFIG ListBox LB_COLORSCHEME { HelpID = "cui:ListBox:RID_SVXPAGE_COLORCONFIG:LB_COLORSCHEME"; - Pos = MAP_APPFONT ( 65 , 14 ) ; + Pos = MAP_APPFONT ( 65 , 13 ) ; Size = MAP_APPFONT ( 77 , 58 ) ; Border = TRUE; Sort = TRUE; @@ -79,14 +79,14 @@ TabPage RID_SVXPAGE_COLORCONFIG Control CT_COLORCONFIG { Pos = MAP_APPFONT ( 12 , 45 ) ; - Size = MAP_APPFONT ( 236 , 134 ) ; + Size = MAP_APPFONT ( 236 , 138 ) ; Border = TRUE; DialogControl = TRUE; OutputSize = TRUE ; ScrollBar VB_VSCROLL { Pos = MAP_APPFONT ( 228 , 10 ) ; - Size = MAP_APPFONT ( 8 , 124 ) ; + Size = MAP_APPFONT ( 8 , 128 ) ; VScroll = TRUE; }; String ST_ON @@ -131,7 +131,7 @@ TabPage RID_SVXPAGE_COLORCONFIG OutputSize = TRUE ; Pos = MAP_APPFONT ( 0 , 10 ) ; - Size = MAP_APPFONT ( 228 , 124 ) ; + Size = MAP_APPFONT ( 228 , 128 ) ; DialogControl = TRUE; FixedText FT_GENERAL diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index 99d58e6be460..c71a1eedf1f5 100644 --- a/cui/source/options/optsave.cxx +++ b/cui/source/options/optsave.cxx @@ -178,6 +178,7 @@ SfxSaveTabPage::SfxSaveTabPage( Window* pParent, const SfxItemSet& rCoreSet ) : aDefaultFormatFL ( this, CUI_RES( FL_FILTER ) ), aODFVersionFT ( this, CUI_RES( FT_ODF_VERSION ) ), aODFVersionLB ( this, CUI_RES( LB_ODF_VERSION ) ), + aODFEncryptionCB ( this, CUI_RES( BTN_ODFENCRYPTION ) ), aSizeOptimizationCB ( this, CUI_RES( BTN_NOPRETTYPRINTING ) ), aWarnAlienFormatCB ( this, CUI_RES( BTN_WARNALIENFORMAT ) ), aDocTypeFT ( this, CUI_RES( FT_APP ) ), @@ -384,6 +385,12 @@ sal_Bool SfxSaveTabPage::FillItemSet( SfxItemSet& rSet ) bModified |= sal_True; } + if ( aODFEncryptionCB.IsChecked() != aODFEncryptionCB.GetSavedValue() ) + { + rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_ODFENCRYPTION ), aODFEncryptionCB.IsChecked() ) ); + bModified |= sal_True; + } + if ( aSizeOptimizationCB.IsChecked() != aSizeOptimizationCB.GetSavedValue() ) { rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_PRETTYPRINTING ), !aSizeOptimizationCB.IsChecked() ) ); @@ -596,6 +603,9 @@ void SfxSaveTabPage::Reset( const SfxItemSet& ) aWarnAlienFormatCB.Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_WARNALIENFORMAT)); // aAutoSaveCB.Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_AUTOSAVE)); + // ODF encryption + aODFEncryptionCB.Check( !aSaveOpt.IsUseSHA1InODF12()); + // the pretty printing aSizeOptimizationCB.Check( !aSaveOpt.IsPrettyPrinting()); // aSizeOptimizationCB.Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_DOPRETTYPRINTING )); @@ -620,6 +630,7 @@ void SfxSaveTabPage::Reset( const SfxItemSet& ) aDocInfoCB.SaveValue(); aBackupCB.SaveValue(); aWarnAlienFormatCB.SaveValue(); + aODFEncryptionCB.SaveValue(); aSizeOptimizationCB.SaveValue(); aAutoSaveCB.SaveValue(); aAutoSaveEdit.SaveValue(); diff --git a/cui/source/options/optsave.hrc b/cui/source/options/optsave.hrc index a637f4a2ee66..e7057936e9de 100644 --- a/cui/source/options/optsave.hrc +++ b/cui/source/options/optsave.hrc @@ -40,6 +40,7 @@ #define BTN_WARNALIENFORMAT 22 #define FT_ODF_VERSION 23 #define LB_ODF_VERSION 24 +#define BTN_ODFENCRYPTION 25 #define GB_RELATIVE 40 #define BTN_RELATIVE_FSYS 41 diff --git a/cui/source/options/optsave.hxx b/cui/source/options/optsave.hxx index a2e2c5df39d1..cf5d7e4d268e 100644 --- a/cui/source/options/optsave.hxx +++ b/cui/source/options/optsave.hxx @@ -66,6 +66,7 @@ private: FixedLine aDefaultFormatFL; FixedText aODFVersionFT; ListBox aODFVersionLB; + CheckBox aODFEncryptionCB; CheckBox aSizeOptimizationCB; CheckBox aWarnAlienFormatCB; FixedText aDocTypeFT; diff --git a/cui/source/options/optsave.src b/cui/source/options/optsave.src index 6b0d0bbafede..892cf7b75c71 100644 --- a/cui/source/options/optsave.src +++ b/cui/source/options/optsave.src @@ -156,36 +156,43 @@ TabPage RID_SFXPAGE_SAVE < "1.2 Extended (recommended)"; 0x7fffffff ; > ; }; }; + CheckBox BTN_ODFENCRYPTION + { + HelpID = "cui:CheckBox:RID_SFXPAGE_SAVE:BTN_ODFENCRYPTION"; + Pos = MAP_APPFONT ( 12 , 120 ) ; + Size = MAP_APPFONT ( 248 , 10 ) ; + Text [ en-US ] = "Enable AES-256 encryption (ODF 1.2)" ; + }; CheckBox BTN_NOPRETTYPRINTING { HelpID = "cui:CheckBox:RID_SFXPAGE_SAVE:BTN_NOPRETTYPRINTING"; - Pos = MAP_APPFONT ( 12 , 120 ) ; + Pos = MAP_APPFONT ( 12 , 131 ) ; Size = MAP_APPFONT ( 248 , 10 ) ; Text [ en-US ] = "Size optimization for ODF format" ; }; CheckBox BTN_WARNALIENFORMAT { HelpID = "cui:CheckBox:RID_SFXPAGE_SAVE:BTN_WARNALIENFORMAT"; - Pos = MAP_APPFONT ( 12 , 131 ) ; + Pos = MAP_APPFONT ( 12 , 142 ) ; Size = MAP_APPFONT ( 248 , 10 ) ; Text [ en-US ] = "Warn when not saving in ODF or default format" ; }; FixedText FT_APP { - Pos = MAP_APPFONT ( 12 , 142 ) ; + Pos = MAP_APPFONT ( 12 , 153 ) ; Size = MAP_APPFONT ( 120 , 8 ) ; Text [ en-US ] = "D~ocument type"; }; FixedText FT_FILTER { - Pos = MAP_APPFONT ( 136 , 142 ) ; + Pos = MAP_APPFONT ( 136 , 153 ) ; Size = MAP_APPFONT ( 120 , 8 ) ; Text [ en-US ] = "Always sa~ve as"; }; ListBox LB_APP { HelpID = "cui:ListBox:RID_SFXPAGE_SAVE:LB_APP"; - Pos = MAP_APPFONT ( 12 , 153 ) ; + Pos = MAP_APPFONT ( 12 , 164 ) ; Size = MAP_APPFONT ( 108 , 58 ) ; Border = TRUE; DropDown = TRUE; @@ -202,14 +209,14 @@ TabPage RID_SFXPAGE_SAVE }; FixedImage FI_FILTER { - Pos = MAP_APPFONT ( 129, 154 ) ; + Pos = MAP_APPFONT ( 129, 153 ) ; Size = MAP_APPFONT ( 6 , 6 ) ; Hide = TRUE; }; ListBox LB_FILTER { HelpID = "cui:ListBox:RID_SFXPAGE_SAVE:LB_FILTER"; - Pos = MAP_APPFONT ( 136 , 153 ) ; + Pos = MAP_APPFONT ( 136 , 164 ) ; Size = MAP_APPFONT ( 108 , 58 ) ; Border = TRUE; Sort = TRUE; @@ -217,16 +224,16 @@ TabPage RID_SFXPAGE_SAVE }; FixedImage FI_ODF_WARNING { - Pos = MAP_APPFONT ( 12, 169 ) ; + Pos = MAP_APPFONT ( 12, 180 ) ; Size = MAP_APPFONT ( 8 , 8 ) ; Hide = TRUE; }; FixedText FT_WARN { - Pos = MAP_APPFONT ( 23 , 169 ) ; + Pos = MAP_APPFONT ( 23 , 180 ) ; Size = MAP_APPFONT ( 239 , 8 ) ; Hide = TRUE; - Text [ en-US ] = "Not using ODF 1.2 Extended may cause infomation to be lost."; + Text [ en-US ] = "Not using ODF 1.2 Extended may cause information to be lost."; }; Image IMG_ODF_WARNING { diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 8928896b9a6d..6762083b0935 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1627,6 +1627,7 @@ SfxItemSet* OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId ) SID_SAVEREL_INET, SID_SAVEREL_FSYS, SID_ATTR_PRETTYPRINTING, SID_ATTR_PRETTYPRINTING, SID_ATTR_WARNALIENFORMAT, SID_ATTR_WARNALIENFORMAT, + SID_ATTR_ODFENCRYPTION, SID_ATTR_ODFENCRYPTION, 0 ); SFX_APP()->GetOptions(*pRet); break; @@ -2679,6 +2680,22 @@ ExtensionsTabPage::~ExtensionsTabPage() { Hide(); DeactivatePage(); + + if ( m_xPage.is() ) + { + Reference< XComponent > xComponent( m_xPage, UNO_QUERY ); + if ( xComponent.is() ) + { + try + { + xComponent->dispose(); + } + catch ( const Exception & ) + { + } + } + m_xPage.clear(); + } } // ----------------------------------------------------------------------- diff --git a/cui/source/tabpages/bbdlg.cxx b/cui/source/tabpages/bbdlg.cxx index afaf3c4afb64..7d8c604e32e7 100644 --- a/cui/source/tabpages/bbdlg.cxx +++ b/cui/source/tabpages/bbdlg.cxx @@ -35,18 +35,37 @@ #include "backgrnd.hxx" #include <dialmgr.hxx> -// class SvxBorderBackgroundDlg ------------------------------------------ +//UUUU +#include "cuitabarea.hxx" -SvxBorderBackgroundDlg::SvxBorderBackgroundDlg( Window *pParent, - const SfxItemSet& rCoreSet, - sal_Bool bEnableSelector ) : +// class SvxBorderBackgroundDlg ------------------------------------------ - SfxTabDialog( pParent, CUI_RES( RID_SVXDLG_BBDLG ), &rCoreSet ), - bEnableBackgroundSelector( bEnableSelector ) +SvxBorderBackgroundDlg::SvxBorderBackgroundDlg(Window *pParent, + const SfxItemSet& rCoreSet, + bool bEnableSelector, + bool bEnableDrawingLayerFillStyles) +: SfxTabDialog( + pParent, + CUI_RES( + bEnableDrawingLayerFillStyles ? RID_SVXDLG_BBDLG_AREA_TRANS : RID_SVXDLG_BBDLG_BACKGROUND), + &rCoreSet), + mbEnableBackgroundSelector(bEnableSelector), + mbEnableDrawingLayerFillStyles(bEnableDrawingLayerFillStyles) { FreeResource(); - AddTabPage( RID_SVXPAGE_BORDER, SvxBorderTabPage::Create, 0 ); - AddTabPage( RID_SVXPAGE_BACKGROUND, SvxBackgroundTabPage::Create, 0 ); + AddTabPage(RID_SVXPAGE_BORDER,SvxBorderTabPage::Create,0); + + if(mbEnableDrawingLayerFillStyles) + { + //UUUU Here we want full DrawingLayer FillStyle access, so add Area and Transparency TabPages + AddTabPage( RID_SVXPAGE_AREA, SvxAreaTabPage::Create, 0 ); + AddTabPage( RID_SVXPAGE_TRANSPARENCE, SvxTransparenceTabPage::Create, 0); + } + else + { + //UUUU Use the more simple Background TabPage + AddTabPage(RID_SVXPAGE_BACKGROUND, SvxBackgroundTabPage::Create, 0); + } } // ----------------------------------------------------------------------- @@ -57,12 +76,48 @@ SvxBorderBackgroundDlg::~SvxBorderBackgroundDlg() // ----------------------------------------------------------------------- -void SvxBorderBackgroundDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) +void SvxBorderBackgroundDlg::PageCreated(sal_uInt16 nPageId, SfxTabPage& rTabPage) { - // Umschalten zwischen Farbe/Grafik ermoeglichen: + switch(nPageId) + { + case RID_SVXPAGE_BACKGROUND: + { + // allow switching between Color/graphic + if(mbEnableBackgroundSelector) + { + static_cast< SvxBackgroundTabPage& >(rTabPage).ShowSelector(); + } + break; + } - if ( bEnableBackgroundSelector && (RID_SVXPAGE_BACKGROUND == nPageId) ) - ((SvxBackgroundTabPage&)rTabPage).ShowSelector( ); -} + //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 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: + { + SfxItemSet aNew( + *GetInputSetImpl()->GetPool(), + SID_COLOR_TABLE, SID_BITMAP_LIST, + SID_OFFER_IMPORT, SID_OFFER_IMPORT, + 0, 0); + aNew.Put(*GetInputSetImpl()); + + // add flag for direct graphic content selection + aNew.Put(SfxBoolItem(SID_OFFER_IMPORT, true)); + + rTabPage.PageCreated(aNew); + break; + } + case RID_SVXPAGE_TRANSPARENCE: + { + rTabPage.PageCreated(*GetInputSetImpl()); + break; + } + } +} +//eof diff --git a/cui/source/tabpages/bbdlg.src b/cui/source/tabpages/bbdlg.src index 520884a6a266..6a8ebc178970 100644 --- a/cui/source/tabpages/bbdlg.src +++ b/cui/source/tabpages/bbdlg.src @@ -24,15 +24,16 @@ #include <cuires.hrc> #include <svx/dialogs.hrc> - // RID_SVXDLG_BBDLG ------------------------------------------------------ -TabDialog RID_SVXDLG_BBDLG +// RID_SVXDLG_BBDLG_BACKGROUND and RID_SVXDLG_BBDLG_AREA_TRANS ------------ + +TabDialog RID_SVXDLG_BBDLG_BACKGROUND { OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 328 , 155 ) ; Text [ en-US ] = "Border / Background" ; Moveable = TRUE ; - // Closeable = TRUE; hat ja einen OKButton + TabControl 1 { OutputSize = TRUE ; @@ -53,6 +54,45 @@ TabDialog RID_SVXDLG_BBDLG }; }; }; + +TabDialog RID_SVXDLG_BBDLG_AREA_TRANS +{ + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 328 , 155 ) ; + Text [ en-US ] = "Border / Background" ; + Moveable = TRUE ; + + TabControl 1 + { + OutputSize = TRUE ; + Pos = MAP_APPFONT ( 2 , 10 ) ; + Size = MAP_APPFONT ( 260 , 135 ) ; + PageList = + { + PageItem + { + Identifier = RID_SVXPAGE_BORDER ; + Text [ en-US ] = "Borders" ; + }; + + //UUUU new Area and Transparence TabPages + PageItem + { + Identifier = RID_SVXPAGE_AREA; + PageResID = RID_SVXPAGE_AREA; + Text [ en-US ] = "Area" ; + }; + PageItem + { + Identifier = RID_SVXPAGE_TRANSPARENCE; + PageResID = RID_SVXPAGE_TRANSPARENCE; + Text [ en-US ] = "Transparency" ; + }; + }; + }; +}; + // ********************************************************************** EOF diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index 8e46557a89e9..89bea48d29bb 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -19,8 +19,6 @@ * *************************************************************/ - - // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_cui.hxx" @@ -61,12 +59,15 @@ #include <editeng/eerdll.hxx> #include <editeng/editrids.hrc> // for RID_SVXSTR_PAPERBIN..., #include <svx/svxids.hrc> - -// #i4219# #include <svtools/optionsdrawinglayer.hxx> #include <svl/slstitm.hxx> //CHINA001 #include <svl/aeitem.hxx> //CHINA001 #include <sfx2/request.hxx> //CHINA001 + +//UUUU +#include <svx/xdef.hxx> +#include <svx/unobrushitemhelper.hxx> + // configuration helper ======================================================= /** Helper to get a configuration setting. @@ -208,19 +209,20 @@ sal_Bool IsEqualSize_Impl( const SvxSizeItem* pSize, const Size& rSize ) #define MARGIN_TOP ( (MarginPosition)0x0004 ) #define MARGIN_BOTTOM ( (MarginPosition)0x0008 ) -struct SvxPage_Impl -{ - MarginPosition m_nPos; - Printer* mpDefPrinter; - bool mbDelPrinter; - - SvxPage_Impl() : - m_nPos( 0 ), - mpDefPrinter( 0 ), - mbDelPrinter( false ) {} - - ~SvxPage_Impl() { if ( mbDelPrinter ) delete mpDefPrinter; } -}; +//UUUU +//struct SvxPage_Impl +//{ +// MarginPosition m_nPos; +// Printer* mpDefPrinter; +// bool mbDelPrinter; +// +// SvxPage_Impl() : +// m_nPos( 0 ), +// mpDefPrinter( 0 ), +// mbDelPrinter( false ) {} +// +// ~SvxPage_Impl() { if ( mbDelPrinter ) delete mpDefPrinter; } +//}; // class SvxPageDescPage -------------------------------------------------- @@ -240,10 +242,8 @@ SfxTabPage* SvxPageDescPage::Create( Window* pParent, const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : - - SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_PAGE ), rAttr ), - +SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) +: SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_PAGE ), rAttr ), aPaperSizeFl ( this, CUI_RES( FL_PAPER_SIZE ) ), aPaperFormatText ( this, CUI_RES( FT_PAPER_FORMAT ) ), aPaperSizeBox ( this, CUI_RES( LB_PAPER_SIZE ) ), @@ -290,8 +290,17 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : eMode ( SVX_PAGE_MODE_STANDARD ), ePaperStart ( PAPER_A3 ), ePaperEnd ( PAPER_ENV_DL ), - pImpl ( new SvxPage_Impl ) + //UUUU + // pImpl ( new SvxPage_Impl ), + + //UUUU + m_nPos( 0 ), + mpDefPrinter( 0 ), + mbDelPrinter( false ), + + //UUUU + mbEnableDrawingLayerFillStyles(false) { bBorderModified = false; FreeResource(); @@ -351,27 +360,28 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : SetFieldUnit( aPaperHeightEdit, eFUnit ); if ( SfxViewShell::Current() && SfxViewShell::Current()->GetPrinter() ) - pImpl->mpDefPrinter = (Printer*)SfxViewShell::Current()->GetPrinter(); + { + mpDefPrinter = (Printer*)SfxViewShell::Current()->GetPrinter(); + } else { - pImpl->mpDefPrinter = new Printer; - pImpl->mbDelPrinter = true; + mpDefPrinter = new Printer; + mbDelPrinter = true; } - MapMode aOldMode = pImpl->mpDefPrinter->GetMapMode(); - pImpl->mpDefPrinter->SetMapMode( MAP_TWIP ); + MapMode aOldMode = mpDefPrinter->GetMapMode(); + mpDefPrinter->SetMapMode( MAP_TWIP ); // First- und Last-Werte f"ur die R"ander setzen - Size aPaperSize = pImpl->mpDefPrinter->GetPaperSize(); - Size aPrintSize = pImpl->mpDefPrinter->GetOutputSize(); + Size aPaperSize = mpDefPrinter->GetPaperSize(); + Size aPrintSize = mpDefPrinter->GetOutputSize(); /* * einen Punkt ( 0,0 ) in logische Koordinaten zu konvertieren, * sieht aus wie Unsinn; ist aber sinnvoll, wenn der Ursprung des * Koordinatensystems verschoben ist. */ - Point aPrintOffset = pImpl->mpDefPrinter->GetPageOffset() - - pImpl->mpDefPrinter->PixelToLogic( Point() ); - pImpl->mpDefPrinter->SetMapMode( aOldMode ); + Point aPrintOffset = mpDefPrinter->GetPageOffset() - mpDefPrinter->PixelToLogic( Point() ); + mpDefPrinter->SetMapMode( aOldMode ); long nOffset = !aPrintOffset.X() && !aPrintOffset.Y() ? 0 : PRINT_OFFSET; aLeftMarginEdit.SetFirst( aLeftMarginEdit.Normalize( aPrintOffset.X() ), FUNIT_TWIP ); @@ -425,7 +435,10 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : SvxPageDescPage::~SvxPageDescPage() { - delete pImpl; + if(mbDelPrinter) + { + delete mpDefPrinter; + } } // ----------------------------------------------------------------------- @@ -509,7 +522,7 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) // allgemeine Seitendaten SvxNumType eNumType = SVX_ARABIC; - bLandscape = ( pImpl->mpDefPrinter->GetOrientation() == ORIENTATION_LANDSCAPE ); + bLandscape = ( mpDefPrinter->GetOrientation() == ORIENTATION_LANDSCAPE ); sal_uInt16 nUse = (sal_uInt16)SVX_PAGE_ALL; pItem = GetItem( rSet, SID_ATTR_PAGE ); @@ -538,7 +551,7 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) { nPaperBin = ( (const SvxPaperBinItem*)pItem )->GetValue(); - if ( nPaperBin >= pImpl->mpDefPrinter->GetPaperBinCount() ) + if ( nPaperBin >= mpDefPrinter->GetPaperBinCount() ) nPaperBin = PAPERBIN_PRINTER_SETTINGS; } @@ -547,21 +560,21 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) if ( PAPERBIN_PRINTER_SETTINGS == nPaperBin ) aBinName = EE_RESSTR( RID_SVXSTR_PAPERBIN_SETTINGS ); else - aBinName = pImpl->mpDefPrinter->GetPaperBinName( (sal_uInt16)nPaperBin ); + aBinName = mpDefPrinter->GetPaperBinName( (sal_uInt16)nPaperBin ); sal_uInt16 nEntryPos = aPaperTrayBox.InsertEntry( aBinName ); aPaperTrayBox.SetEntryData( nEntryPos, (void*)(sal_uLong)nPaperBin ); aPaperTrayBox.SelectEntry( aBinName ); // Size rausholen - Size aPaperSize = SvxPaperInfo::GetPaperSize( pImpl->mpDefPrinter ); + Size aPaperSize = SvxPaperInfo::GetPaperSize( mpDefPrinter ); pItem = GetItem( rSet, SID_ATTR_PAGE_SIZE ); if ( pItem ) aPaperSize = ( (const SvxSizeItem*)pItem )->GetSize(); bool bOrientationSupport = - pImpl->mpDefPrinter->HasSupport( SUPPORT_SET_ORIENTATION ); + mpDefPrinter->HasSupport( SUPPORT_SET_ORIENTATION ); #ifdef OS2 // unter OS/2 wird bei HasSupport() immer sal_True returned // aber nur als Dummy, deshalb FALSE @@ -1005,11 +1018,11 @@ IMPL_LINK( SvxPageDescPage, PaperBinHdl_Impl, ListBox *, EMPTYARG ) aPaperTrayBox.SetEntryData( nEntryPos, (void*)(sal_uLong)PAPERBIN_PRINTER_SETTINGS ); String aPaperBin( EditResId( RID_SVXSTR_PAPERBIN ) ); - sal_uInt16 nBinCount = pImpl->mpDefPrinter->GetPaperBinCount(); + sal_uInt16 nBinCount = mpDefPrinter->GetPaperBinCount(); for ( sal_uInt16 i = 0; i < nBinCount; ++i ) { - String aName = pImpl->mpDefPrinter->GetPaperBinName(i); + String aName = mpDefPrinter->GetPaperBinName(i); if ( !aName.Len() ) { @@ -1158,27 +1171,26 @@ IMPL_LINK( SvxPageDescPage, SwapOrientation_Impl, RadioButton *, pBtn ) void SvxPageDescPage::SwapFirstValues_Impl( bool bSet ) { - MapMode aOldMode = pImpl->mpDefPrinter->GetMapMode(); + MapMode aOldMode = mpDefPrinter->GetMapMode(); Orientation eOri = ORIENTATION_PORTRAIT; if ( bLandscape ) eOri = ORIENTATION_LANDSCAPE; - Orientation eOldOri = pImpl->mpDefPrinter->GetOrientation(); - pImpl->mpDefPrinter->SetOrientation( eOri ); - pImpl->mpDefPrinter->SetMapMode( MAP_TWIP ); + Orientation eOldOri = mpDefPrinter->GetOrientation(); + mpDefPrinter->SetOrientation( eOri ); + mpDefPrinter->SetMapMode( MAP_TWIP ); // First- und Last-Werte f"ur die R"ander setzen - Size aPaperSize = pImpl->mpDefPrinter->GetPaperSize(); - Size aPrintSize = pImpl->mpDefPrinter->GetOutputSize(); + Size aPaperSize = mpDefPrinter->GetPaperSize(); + Size aPrintSize = mpDefPrinter->GetOutputSize(); /* * einen Punkt ( 0,0 ) in logische Koordinaten zu konvertieren, * sieht aus wie Unsinn; ist aber sinnvoll, wenn der Ursprung des * Koordinatensystems verschoben ist. */ - Point aPrintOffset = pImpl->mpDefPrinter->GetPageOffset() - - pImpl->mpDefPrinter->PixelToLogic( Point() ); - pImpl->mpDefPrinter->SetMapMode( aOldMode ); - pImpl->mpDefPrinter->SetOrientation( eOldOri ); + Point aPrintOffset = mpDefPrinter->GetPageOffset() - mpDefPrinter->PixelToLogic( Point() ); + mpDefPrinter->SetMapMode( aOldMode ); + mpDefPrinter->SetOrientation( eOldOri ); sal_Int64 nSetL = aLeftMarginEdit.Denormalize( aLeftMarginEdit.GetValue( FUNIT_TWIP ) ); @@ -1260,90 +1272,124 @@ void SvxPageDescPage::UpdateExample_Impl( bool bResetbackground ) // ----------------------------------------------------------------------- -void SvxPageDescPage::ResetBackground_Impl( const SfxItemSet& rSet ) +void SvxPageDescPage::ResetBackground_Impl(const SfxItemSet& rSet) { - sal_uInt16 nWhich = GetWhich( SID_ATTR_PAGE_HEADERSET ); + sal_uInt16 nWhich(GetWhich(SID_ATTR_PAGE_HEADERSET)); - if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET ) + if(SFX_ITEM_SET == rSet.GetItemState(nWhich, sal_False)) { - const SvxSetItem& rSetItem = - (const SvxSetItem&)rSet.Get( nWhich, sal_False ); + const SvxSetItem& rSetItem = static_cast< const SvxSetItem& >(rSet.Get(nWhich, sal_False)); const SfxItemSet& rTmpSet = rSetItem.GetItemSet(); - const SfxBoolItem& rOn = - (const SfxBoolItem&)rTmpSet.Get( GetWhich( SID_ATTR_PAGE_ON ) ); + const SfxBoolItem& rOn = static_cast< const SfxBoolItem& >(rTmpSet.Get(GetWhich(SID_ATTR_PAGE_ON))); - if ( rOn.GetValue() ) + if(rOn.GetValue()) { - nWhich = GetWhich( SID_ATTR_BRUSH ); + drawinglayer::attribute::SdrAllFillAttributesHelperPtr aHeaderFillAttributes; - if ( rTmpSet.GetItemState( nWhich ) == SFX_ITEM_SET ) + if(mbEnableDrawingLayerFillStyles) + { + //UUUU create FillAttributes directly from DrawingLayer FillStyle entries + aHeaderFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(rTmpSet)); + } + else { - const SvxBrushItem& rItem = - (const SvxBrushItem&)rTmpSet.Get( nWhich ); - aBspWin.SetHdColor( rItem.GetColor() ); + nWhich = GetWhich(SID_ATTR_BRUSH); + + if(SFX_ITEM_SET == rTmpSet.GetItemState(nWhich)) + { + //UUUU create FillAttributes from SvxBrushItem + const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rTmpSet.Get(nWhich)); + SfxItemSet aTempSet(*rTmpSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST); + + setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet); + aHeaderFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet)); + } } - nWhich = GetWhich( SID_ATTR_BORDER_OUTER ); - if ( rTmpSet.GetItemState( nWhich ) == SFX_ITEM_SET ) + aBspWin.setHeaderFillAttributes(aHeaderFillAttributes); + nWhich = GetWhich(SID_ATTR_BORDER_OUTER); + + if(rTmpSet.GetItemState(nWhich) == SFX_ITEM_SET) { - const SvxBoxItem& rItem = - (const SvxBoxItem&)rTmpSet.Get( nWhich ); - aBspWin.SetHdBorder( rItem ); + const SvxBoxItem& rItem = static_cast< const SvxBoxItem& >(rTmpSet.Get(nWhich)); + aBspWin.SetHdBorder(rItem); } } } - nWhich = GetWhich( SID_ATTR_PAGE_FOOTERSET ); + nWhich = GetWhich(SID_ATTR_PAGE_FOOTERSET); - if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET ) + if(SFX_ITEM_SET == rSet.GetItemState(nWhich, sal_False)) { - const SvxSetItem& rSetItem = - (const SvxSetItem&)rSet.Get( nWhich, sal_False ); + const SvxSetItem& rSetItem = static_cast< const SvxSetItem& >(rSet.Get(nWhich,sal_False)); const SfxItemSet& rTmpSet = rSetItem.GetItemSet(); - const SfxBoolItem& rOn = - (const SfxBoolItem&)rTmpSet.Get( GetWhich( SID_ATTR_PAGE_ON ) ); + const SfxBoolItem& rOn = static_cast< const SfxBoolItem& >(rTmpSet.Get(GetWhich(SID_ATTR_PAGE_ON))); - if ( rOn.GetValue() ) + if(rOn.GetValue()) { - nWhich = GetWhich( SID_ATTR_BRUSH ); + drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFooterFillAttributes; - if ( rTmpSet.GetItemState( nWhich ) == SFX_ITEM_SET ) + if(mbEnableDrawingLayerFillStyles) { - const SvxBrushItem& rItem = - (const SvxBrushItem&)rTmpSet.Get( nWhich ); - aBspWin.SetFtColor( rItem.GetColor() ); + //UUUU create FillAttributes directly from DrawingLayer FillStyle entries + aFooterFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(rTmpSet)); + } + else + { + nWhich = GetWhich(SID_ATTR_BRUSH); + + if(SFX_ITEM_SET == rTmpSet.GetItemState(nWhich)) + { + //UUUU create FillAttributes from SvxBrushItem + const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rTmpSet.Get(nWhich)); + SfxItemSet aTempSet(*rTmpSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST); + + setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet); + aFooterFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet)); + } } - nWhich = GetWhich( SID_ATTR_BORDER_OUTER ); - if ( rTmpSet.GetItemState( nWhich ) == SFX_ITEM_SET ) + aBspWin.setFooterFillAttributes(aFooterFillAttributes); + nWhich = GetWhich(SID_ATTR_BORDER_OUTER); + + if(rTmpSet.GetItemState(nWhich) == SFX_ITEM_SET) { - const SvxBoxItem& rItem = - (const SvxBoxItem&)rTmpSet.Get( nWhich ); - aBspWin.SetFtBorder( rItem ); + const SvxBoxItem& rItem = static_cast< const SvxBoxItem& >(rTmpSet.Get(nWhich)); + aBspWin.SetFtBorder(rItem); } } } - const SfxPoolItem* pItem = GetItem( rSet, SID_ATTR_BRUSH ); + drawinglayer::attribute::SdrAllFillAttributesHelperPtr aPageFillAttributes; + const SfxPoolItem* pItem = 0; - if ( pItem ) + if(mbEnableDrawingLayerFillStyles) { - aBspWin.SetColor( ( (const SvxBrushItem*)pItem )->GetColor() ); - const Graphic* pGrf = ( (const SvxBrushItem*)pItem )->GetGraphic(); + //UUUU create FillAttributes directly from DrawingLayer FillStyle entries + aPageFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(rSet)); + } + else + { + pItem = GetItem(rSet, SID_ATTR_BRUSH); - if ( pGrf ) + if(pItem) { - Bitmap aBitmap = pGrf->GetBitmap(); - aBspWin.SetBitmap( &aBitmap ); + //UUUU create FillAttributes from SvxBrushItem + const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(*pItem); + SfxItemSet aTempSet(*rSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST); + + setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet); + aPageFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet)); } - else - aBspWin.SetBitmap( NULL ); } - pItem = GetItem( rSet, SID_ATTR_BORDER_OUTER ); + aBspWin.setPageFillAttributes(aPageFillAttributes); + pItem = GetItem(rSet, SID_ATTR_BORDER_OUTER); - if ( pItem ) - aBspWin.SetBorder( (SvxBoxItem&)*pItem ); + if(pItem) + { + aBspWin.SetBorder(static_cast< const SvxBoxItem& >(*pItem)); + } } // ----------------------------------------------------------------------- @@ -1387,15 +1433,30 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) aBspWin.SetHeader( sal_False ); // im Beispiel Hintergrund und Umrandung anzeigen - sal_uInt16 nWhich = GetWhich( SID_ATTR_BRUSH ); + drawinglayer::attribute::SdrAllFillAttributesHelperPtr aHeaderFillAttributes; - if ( rHeaderSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE ) + if(mbEnableDrawingLayerFillStyles) { - const SvxBrushItem& rItem = - (const SvxBrushItem&)rHeaderSet.Get( nWhich ); - aBspWin.SetHdColor( rItem.GetColor() ); + //UUUU create FillAttributes directly from DrawingLayer FillStyle entries + aHeaderFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(rHeaderSet)); + } + else + { + const sal_uInt16 nWhich(GetWhich(SID_ATTR_BRUSH)); + + if(rHeaderSet.GetItemState(nWhich) >= SFX_ITEM_AVAILABLE) + { + //UUUU aBspWin.SetHdColor(rItem.GetColor()); + const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rHeaderSet.Get(nWhich)); + SfxItemSet aTempSet(*rHeaderSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST); + + setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet); + aHeaderFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet)); + } } - nWhich = GetWhich( SID_ATTR_BORDER_OUTER ); + + aBspWin.setHeaderFillAttributes(aHeaderFillAttributes); + const sal_uInt16 nWhich(GetWhich(SID_ATTR_BORDER_OUTER)); if ( rHeaderSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE ) { @@ -1434,15 +1495,30 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) aBspWin.SetFooter( sal_False ); // im Beispiel Hintergrund und Umrandung anzeigen - sal_uInt16 nWhich = GetWhich( SID_ATTR_BRUSH ); + drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFooterFillAttributes; - if ( rFooterSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE ) + if(mbEnableDrawingLayerFillStyles) { - const SvxBrushItem& rItem = - (const SvxBrushItem&)rFooterSet.Get( nWhich ); - aBspWin.SetFtColor( rItem.GetColor() ); + //UUUU create FillAttributes directly from DrawingLayer FillStyle entries + aFooterFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(rFooterSet)); + } + else + { + const sal_uInt16 nWhich(GetWhich(SID_ATTR_BRUSH)); + + if(rFooterSet.GetItemState(nWhich) >= SFX_ITEM_AVAILABLE) + { + //UUUU aBspWin.SetFtColor(rItem.GetColor()); + const SvxBrushItem& rItem = (const SvxBrushItem&)rFooterSet.Get(nWhich); + SfxItemSet aTempSet(*rFooterSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST); + + setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet); + aFooterFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet)); + } } - nWhich = GetWhich( SID_ATTR_BORDER_OUTER ); + + aBspWin.setFooterFillAttributes(aFooterFillAttributes); + const sal_uInt16 nWhich(GetWhich(SID_ATTR_BORDER_OUTER)); if ( rFooterSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE ) { @@ -1458,6 +1534,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) void SvxPageDescPage::ActivatePage( const SfxItemSet& rSet ) { InitHeadFoot_Impl( rSet ); + UpdateExample_Impl(); ResetBackground_Impl( rSet ); RangeHdl_Impl( 0 ); } @@ -1702,7 +1779,7 @@ bool SvxPageDescPage::IsPrinterRangeOverflow( MetricField& rField, long nFirstMargin, long nLastMargin, MarginPosition nPos ) { bool bRet = false; - bool bCheck = ( ( pImpl->m_nPos & nPos ) == 0 ); + bool bCheck = ( ( m_nPos & nPos ) == 0 ); long nValue = static_cast<long>(rField.GetValue()); if ( bCheck && ( nValue < nFirstMargin || nValue > nLastMargin ) && @@ -1721,53 +1798,74 @@ bool SvxPageDescPage::IsPrinterRangeOverflow( void SvxPageDescPage::CheckMarginEdits( bool _bClear ) { if ( _bClear ) - pImpl->m_nPos = 0; + m_nPos = 0; sal_Int64 nValue = aLeftMarginEdit.GetValue(); if ( nValue < nFirstLeftMargin || nValue > nLastLeftMargin ) - pImpl->m_nPos |= MARGIN_LEFT; + m_nPos |= MARGIN_LEFT; nValue = aRightMarginEdit.GetValue(); if ( nValue < nFirstRightMargin || nValue > nLastRightMargin ) - pImpl->m_nPos |= MARGIN_RIGHT; + m_nPos |= MARGIN_RIGHT; nValue = aTopMarginEdit.GetValue(); if ( nValue < nFirstTopMargin || nValue > nLastTopMargin ) - pImpl->m_nPos |= MARGIN_TOP; + m_nPos |= MARGIN_TOP; nValue = aBottomMarginEdit.GetValue(); if ( nValue < nFirstBottomMargin || nValue > nLastBottomMargin ) - pImpl->m_nPos |= MARGIN_BOTTOM; + m_nPos |= MARGIN_BOTTOM; } bool SvxPageDescPage::IsMarginOutOfRange() { - bool bRet = ( ( ( !( pImpl->m_nPos & MARGIN_LEFT ) && + bool bRet = ( ( ( !( m_nPos & MARGIN_LEFT ) && ( aLeftMarginEdit.GetText() != aLeftMarginEdit.GetSavedValue() ) ) && ( aLeftMarginEdit.GetValue() < nFirstLeftMargin || aLeftMarginEdit.GetValue() > nLastLeftMargin ) ) || - ( ( !( pImpl->m_nPos & MARGIN_RIGHT ) && + ( ( !( m_nPos & MARGIN_RIGHT ) && ( aRightMarginEdit.GetText() != aRightMarginEdit.GetSavedValue() ) ) && ( aRightMarginEdit.GetValue() < nFirstRightMargin || aRightMarginEdit.GetValue() > nLastRightMargin ) ) || - ( ( !( pImpl->m_nPos & MARGIN_TOP ) && + ( ( !( m_nPos & MARGIN_TOP ) && ( aTopMarginEdit.GetText() != aTopMarginEdit.GetSavedValue() ) ) && ( aTopMarginEdit.GetValue() < nFirstTopMargin || aTopMarginEdit.GetValue() > nLastTopMargin ) ) || - ( ( !( pImpl->m_nPos & MARGIN_BOTTOM ) && + ( ( !( m_nPos & MARGIN_BOTTOM ) && ( aBottomMarginEdit.GetText() != aBottomMarginEdit.GetSavedValue() ) ) && ( aBottomMarginEdit.GetValue() < nFirstBottomMargin || aBottomMarginEdit.GetValue() > nLastBottomMargin ) ) ); return bRet; } -void SvxPageDescPage::PageCreated (SfxAllItemSet aSet) //add CHINA001 +void SvxPageDescPage::PageCreated(SfxAllItemSet aSet) //add CHINA001 { - SFX_ITEMSET_ARG (&aSet,pModeItem,SfxAllEnumItem,SID_ENUM_PAGE_MODE ); - SFX_ITEMSET_ARG (&aSet,pPaperStartItem,SfxAllEnumItem,SID_PAPER_START ); - SFX_ITEMSET_ARG (&aSet,pPaperEndItem,SfxAllEnumItem,SID_PAPER_END ); - SFX_ITEMSET_ARG (&aSet,pCollectListItem,SfxStringListItem,SID_COLLECT_LIST ); - if (pModeItem) + SFX_ITEMSET_ARG(&aSet,pModeItem,SfxAllEnumItem,SID_ENUM_PAGE_MODE); + SFX_ITEMSET_ARG(&aSet,pPaperStartItem,SfxAllEnumItem,SID_PAPER_START); + SFX_ITEMSET_ARG(&aSet,pPaperEndItem,SfxAllEnumItem,SID_PAPER_END); + SFX_ITEMSET_ARG(&aSet,pCollectListItem,SfxStringListItem,SID_COLLECT_LIST); + + //UUUU + SFX_ITEMSET_ARG (&aSet, pSupportDrawingLayerFillStyleItem, SfxBoolItem, SID_DRAWINGLAYER_FILLSTYLES); + + if(pModeItem) + { SetMode((SvxModeType)pModeItem->GetEnumValue()); - if (pPaperStartItem && pPaperEndItem) - SetPaperFormatRanges( (Paper)pPaperStartItem->GetEnumValue(), (Paper)pPaperEndItem->GetEnumValue() ); - if (pCollectListItem) + } + + if(pPaperStartItem && pPaperEndItem) + { + SetPaperFormatRanges((Paper)pPaperStartItem->GetEnumValue(),(Paper)pPaperEndItem->GetEnumValue()); + } + + if(pCollectListItem) + { SetCollectionList(pCollectListItem->GetList()); + } + + if(pSupportDrawingLayerFillStyleItem) + { + const bool bNew(pSupportDrawingLayerFillStyleItem->GetValue()); + + EnableDrawingLayerFillStyles(bNew); + } } + +//eof diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 3340c68ffde6..06fd964add8b 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -840,8 +840,11 @@ void SvxAreaTabPage::Construct() void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet ) { - sal_uInt16 _nPos = 0; - sal_uInt16 nCount; + //UUUU use evtl. previously selected entry to avoid changing values just by + // switching TabPages in dialogs using this TabPage + sal_uInt16 _nPos(nPos); + sal_uInt16 nCount(0); + //add CHINA001 Begin SFX_ITEMSET_ARG (&rSet,pPageTypeItem,SfxUInt16Item,SID_PAGE_TYPE ); SFX_ITEMSET_ARG (&rSet,pPosItem,SfxUInt16Item,SID_TABPAGE_POS ); @@ -2756,6 +2759,7 @@ void SvxAreaTabPage::PageCreated (SfxAllItemSet aSet) //add CHINA001 SFX_ITEMSET_ARG (&aSet,pDlgTypeItem,SfxUInt16Item,SID_DLG_TYPE ); SFX_ITEMSET_ARG (&aSet,pPosItem,SfxUInt16Item,SID_TABPAGE_POS ); + //UUUU SFX_ITEMSET_ARG (&aSet, pOfferImportItem, SfxBoolItem, SID_OFFER_IMPORT ); diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 9a6f7fb97a0d..aba1d19c915c 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -1928,7 +1928,7 @@ IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) aSymbolSize=aSize; } else if( nPreviousSymbolType == SVX_SYMBOLTYPE_BRUSHITEM ) - { //#i31097# Data Point Symbol size changes when a different symbol is choosen(maoyg) + { //#i31097# Data Point Symbol size changes when a different symbol is chosen(maoyg) if( aSymbolSize.Width() != aSymbolSize.Height() ) { aSize.setWidth( (long)( aSymbolSize.Width() + aSymbolSize.Height() )/2 ); diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index 64dbab803c0d..587c256d9fa9 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -835,7 +835,7 @@ void SvxPositionSizeTabPage::Construct() if(!maAnchor.equal(pCandidate->GetAnchorPos())) { - // diferent anchor positions + // different anchor positions maMtrPosX.SetText( String() ); maMtrPosY.SetText( String() ); mbPageDisabled = sal_True; |