cui/UIConfig_cui.mk | 1 cui/source/options/optinet2.cxx | 12 +--- cui/source/options/optinet2.hrc | 7 -- cui/source/options/optinet2.hxx | 3 - cui/source/options/optinet2.src | 24 -------- cui/uiconfig/ui/optbrowserpage.ui | 42 +++++++++++++++ dbaccess/source/ui/inc/UITools.hxx | 6 -- dbaccess/source/ui/misc/HtmlReader.cxx | 3 - dbaccess/source/ui/misc/RtfReader.cxx | 3 - dbaccess/source/ui/misc/UITools.cxx | 78 ---------------------------- helpcontent2 | 2 toolkit/inc/toolkit/helper/vclunohelper.hxx | 5 + toolkit/source/helper/vclunohelper.cxx | 2 13 files changed, 59 insertions(+), 129 deletions(-)
New commits: commit 0039c8598cfdd3fd31f83d3c1f336f858773d25f Author: Caolán McNamara <[email protected]> Date: Tue Apr 16 09:43:43 2013 +0100 convert browser options to .ui Change-Id: Ia3672c43b0e80e45ff3404fa84a11182cd6c03a0 diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 3fbdb23..8f33c88 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -39,6 +39,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/optaccessibilitypage \ cui/uiconfig/ui/optadvancedpage \ cui/uiconfig/ui/optappearancepage \ + cui/uiconfig/ui/optbrowserpage \ cui/uiconfig/ui/optfltrpage \ cui/uiconfig/ui/optfontspage \ cui/uiconfig/ui/optgeneralpage \ diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 668d354..9e69a0c 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -953,11 +953,9 @@ void SvxSecurityTabPage::Reset( const SfxItemSet& ) } MozPluginTabPage::MozPluginTabPage(Window* pParent, const SfxItemSet& rSet) - : SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_INET_MOZPLUGIN ), rSet ), - aMSWordGB ( this, CUI_RES( GB_MOZPLUGIN ) ), - aWBasicCodeCB ( this, CUI_RES( CB_MOZPLUGIN_CODE ) ) + : SfxTabPage(pParent, "OptBrowserPage", "cui/ui/optbrowserpage.ui", rSet) { - FreeResource(); + get(m_pWBasicCodeCB, "display"); } MozPluginTabPage::~MozPluginTabPage() @@ -972,7 +970,7 @@ SfxTabPage* MozPluginTabPage::Create( Window* pParent, sal_Bool MozPluginTabPage::FillItemSet( SfxItemSet& ) { sal_Bool hasInstall = isInstalled(); - sal_Bool hasChecked = aWBasicCodeCB.IsChecked(); + sal_Bool hasChecked = m_pWBasicCodeCB->IsChecked(); if(hasInstall && (!hasChecked)){ //try to uninstall uninstallPlugin(); @@ -988,8 +986,8 @@ sal_Bool MozPluginTabPage::FillItemSet( SfxItemSet& ) } void MozPluginTabPage::Reset( const SfxItemSet& ) { - aWBasicCodeCB.Check( isInstalled()); - aWBasicCodeCB.SaveValue(); + m_pWBasicCodeCB->Check( isInstalled()); + m_pWBasicCodeCB->SaveValue(); } #ifdef WNT diff --git a/cui/source/options/optinet2.hrc b/cui/source/options/optinet2.hrc index f61d424..6fe0a43 100644 --- a/cui/source/options/optinet2.hrc +++ b/cui/source/options/optinet2.hrc @@ -72,13 +72,6 @@ #define PB_MAILERURL 5 #define STR_DEFAULT_FILENAME 6 -// plugin -#define GB_MOZPLUGIN 1 -#define CB_MOZPLUGIN_CODE 2 - - #endif // #ifndef _SVX_OPTINET_HRC -// ******************************************************************* EOF - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx index 1325c79..0d96cff 100644 --- a/cui/source/options/optinet2.hxx +++ b/cui/source/options/optinet2.hxx @@ -193,8 +193,7 @@ public: class MozPluginTabPage : public SfxTabPage { - FixedLine aMSWordGB; - CheckBox aWBasicCodeCB; + CheckBox* m_pWBasicCodeCB; sal_Bool isInstalled(void); sal_Bool installPlugin(void); diff --git a/cui/source/options/optinet2.src b/cui/source/options/optinet2.src index 632721a..5eecd85 100644 --- a/cui/source/options/optinet2.src +++ b/cui/source/options/optinet2.src @@ -28,30 +28,6 @@ /* */ /************************************************************************/ -TabPage RID_SVXPAGE_INET_MOZPLUGIN -{ - HelpID = "cui:TabPage:RID_SVXPAGE_INET_MOZPLUGIN"; - OutputSize = TRUE ; - Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ; - SVLook = TRUE ; - Hide = TRUE ; - - FixedLine GB_MOZPLUGIN - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 248 , 8 ) ; - Text[ en-US ] = "Browser Plug-in"; - }; - CheckBox CB_MOZPLUGIN_CODE - { - HelpID = "cui:CheckBox:RID_SVXPAGE_INET_MOZPLUGIN:CB_MOZPLUGIN_CODE"; - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 236 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Display documents in browser" ; - }; -}; - TabPage RID_SVXPAGE_INET_PROXY { HelpId = HID_OPTIONS_PROXY ; diff --git a/cui/uiconfig/ui/optbrowserpage.ui b/cui/uiconfig/ui/optbrowserpage.ui new file mode 100644 index 0000000..279b387 --- /dev/null +++ b/cui/uiconfig/ui/optbrowserpage.ui @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkFrame" id="OptBrowserPage"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="border_width">6</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkCheckButton" id="display"> + <property name="label" translatable="yes">_Display documents in browser</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="valign">start</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Browser Plug-in</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> +</interface> commit cb7412b8185d6b94ca59b48668ec5e77fa8f7999 Author: Caolán McNamara <[email protected]> Date: Tue Apr 16 09:14:28 2013 +0100 merge duplicated CreateFontDescriptor methods Change-Id: I33f9df7f17158eedc4a4c0dedfd0fc4cddc6180f diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx index 0ee6970..7c4f624 100644 --- a/dbaccess/source/ui/inc/UITools.hxx +++ b/dbaccess/source/ui/inc/UITools.hxx @@ -182,12 +182,6 @@ namespace dbaui */ SvxCellHorJustify mapTextJustify(const sal_Int32& _nAlignment); - /** convert Font to ::com::sun::star::awt::FontDescriptor - @param _rFont Font to be converted - @return the new FontDescriptor - */ - ::com::sun::star::awt::FontDescriptor CreateFontDescriptor( const Font& _rFont ); - /** call the format dialog and set the selected format at the column @param _xAffectedCol Font to be converted @param _xField Font to be converted diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx index cc8676d..8ab0ed0 100644 --- a/dbaccess/source/ui/misc/HtmlReader.cxx +++ b/dbaccess/source/ui/misc/HtmlReader.cxx @@ -20,6 +20,7 @@ #include "HtmlReader.hxx" #include <connectivity/dbconversion.hxx> #include <connectivity/dbtools.hxx> +#include <toolkit/helper/vclunohelper.hxx> #include <tools/tenccvt.hxx> #include <comphelper/extract.hxx> #include <comphelper/string.hxx> @@ -439,7 +440,7 @@ sal_Bool OHTMLReader::CreateTable(int nToken) SvxCellHorJustify eVal; String aTableName; - FontDescriptor aFont = ::dbaui::CreateFontDescriptor(Application::GetSettings().GetStyleSettings().GetAppFont()); + FontDescriptor aFont = VCLUnoHelper::CreateFontDescriptor(Application::GetSettings().GetStyleSettings().GetAppFont()); sal_Int32 nTextColor = 0; do { diff --git a/dbaccess/source/ui/misc/RtfReader.cxx b/dbaccess/source/ui/misc/RtfReader.cxx index ba19f26..8e85fbe 100644 --- a/dbaccess/source/ui/misc/RtfReader.cxx +++ b/dbaccess/source/ui/misc/RtfReader.cxx @@ -33,6 +33,7 @@ #include <com/sun/star/util/XNumberFormatTypes.hpp> #include "dbustrings.hrc" #include <svtools/rtftoken.h> +#include <toolkit/helper/vclunohelper.hxx> #include "dbu_misc.hrc" #include <vcl/msgbox.hxx> #include <connectivity/dbconversion.hxx> @@ -270,7 +271,7 @@ sal_Bool ORTFReader::CreateTable(int nToken) int nTmpToken2 = nToken; String aColumnName; - FontDescriptor aFont = ::dbaui::CreateFontDescriptor(Application::GetSettings().GetStyleSettings().GetAppFont()); + FontDescriptor aFont = VCLUnoHelper::CreateFontDescriptor(Application::GetSettings().GetStyleSettings().GetAppFont()); do { switch(nTmpToken2) diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index f71fdcd..41633e2 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -753,84 +753,6 @@ SvxCellHorJustify mapTextJustify(const sal_Int32& _nAlignment) return eJustify; } // ----------------------------------------------------------------------------- -float ConvertFontWeight( ::FontWeight eWeight ) -{ - if( eWeight == WEIGHT_DONTKNOW ) - return ::com::sun::star::awt::FontWeight::DONTKNOW; - else if( eWeight == WEIGHT_THIN ) - return ::com::sun::star::awt::FontWeight::THIN; - else if( eWeight == WEIGHT_ULTRALIGHT ) - return ::com::sun::star::awt::FontWeight::ULTRALIGHT; - else if( eWeight == WEIGHT_LIGHT ) - return ::com::sun::star::awt::FontWeight::LIGHT; - else if( eWeight == WEIGHT_SEMILIGHT ) - return ::com::sun::star::awt::FontWeight::SEMILIGHT; - else if( ( eWeight == WEIGHT_NORMAL ) || ( eWeight == WEIGHT_MEDIUM ) ) - return ::com::sun::star::awt::FontWeight::NORMAL; - else if( eWeight == WEIGHT_SEMIBOLD ) - return ::com::sun::star::awt::FontWeight::SEMIBOLD; - else if( eWeight == WEIGHT_BOLD ) - return ::com::sun::star::awt::FontWeight::BOLD; - else if( eWeight == WEIGHT_ULTRABOLD ) - return ::com::sun::star::awt::FontWeight::ULTRABOLD; - else if( eWeight == WEIGHT_BLACK ) - return ::com::sun::star::awt::FontWeight::BLACK; - - SAL_WARN("dbaccess.ui", "Unknown FontWeight" ); - return ::com::sun::star::awt::FontWeight::DONTKNOW; -} -// ----------------------------------------------------------------------------- -float ConvertFontWidth( ::FontWidth eWidth ) -{ - if( eWidth == WIDTH_DONTKNOW ) - return ::com::sun::star::awt::FontWidth::DONTKNOW; - else if( eWidth == WIDTH_ULTRA_CONDENSED ) - return ::com::sun::star::awt::FontWidth::ULTRACONDENSED; - else if( eWidth == WIDTH_EXTRA_CONDENSED ) - return ::com::sun::star::awt::FontWidth::EXTRACONDENSED; - else if( eWidth == WIDTH_CONDENSED ) - return ::com::sun::star::awt::FontWidth::CONDENSED; - else if( eWidth == WIDTH_SEMI_CONDENSED ) - return ::com::sun::star::awt::FontWidth::SEMICONDENSED; - else if( eWidth == WIDTH_NORMAL ) - return ::com::sun::star::awt::FontWidth::NORMAL; - else if( eWidth == WIDTH_SEMI_EXPANDED ) - return ::com::sun::star::awt::FontWidth::SEMIEXPANDED; - else if( eWidth == WIDTH_EXPANDED ) - return ::com::sun::star::awt::FontWidth::EXPANDED; - else if( eWidth == WIDTH_EXTRA_EXPANDED ) - return ::com::sun::star::awt::FontWidth::EXTRAEXPANDED; - else if( eWidth == WIDTH_ULTRA_EXPANDED ) - return ::com::sun::star::awt::FontWidth::ULTRAEXPANDED; - - SAL_WARN("dbaccess.ui", "Unknown FontWidth" ); - return ::com::sun::star::awt::FontWidth::DONTKNOW; -} -// ----------------------------------------------------------------------------- -::com::sun::star::awt::FontDescriptor CreateFontDescriptor( const Font& rFont ) -{ - ::com::sun::star::awt::FontDescriptor aFD; - aFD.Name = rFont.GetName(); - aFD.StyleName = rFont.GetStyleName(); - aFD.Height = (sal_Int16)rFont.GetSize().Height(); - aFD.Width = (sal_Int16)rFont.GetSize().Width(); - aFD.Family = sal::static_int_cast< sal_Int16 >(rFont.GetFamily()); - aFD.CharSet = rFont.GetCharSet(); - aFD.Pitch = sal::static_int_cast< sal_Int16 >(rFont.GetPitch()); - aFD.CharacterWidth = ConvertFontWidth( rFont.GetWidthType() ); - aFD.Weight = ConvertFontWeight( rFont.GetWeight() ); - aFD.Slant = (::com::sun::star::awt::FontSlant)rFont.GetItalic(); - aFD.Underline = sal::static_int_cast< sal_Int16 >( - rFont.GetUnderline()); - aFD.Strikeout = sal::static_int_cast< sal_Int16 >( - rFont.GetStrikeout()); - aFD.Orientation = rFont.GetOrientation(); - aFD.Kerning = rFont.IsKerning(); - aFD.WordLineMode = rFont.IsWordLineMode(); - aFD.Type = 0; // ??? => Nur an Metric... - return aFD; -} -// ----------------------------------------------------------------------------- void callColumnFormatDialog(const Reference<XPropertySet>& xAffectedCol, const Reference<XPropertySet>& xField, SvNumberFormatter* _pFormatter, diff --git a/toolkit/inc/toolkit/helper/vclunohelper.hxx b/toolkit/inc/toolkit/helper/vclunohelper.hxx index 7c07a87..cb1da9f 100644 --- a/toolkit/inc/toolkit/helper/vclunohelper.hxx +++ b/toolkit/inc/toolkit/helper/vclunohelper.hxx @@ -94,7 +94,10 @@ public: // Polygon static Polygon CreatePolygon( const ::com::sun::star::uno::Sequence< sal_Int32 >& DataX, const ::com::sun::star::uno::Sequence< sal_Int32 >& DataY ); - // Font + /** convert Font to ::com::sun::star::awt::FontDescriptor + @param rFont Font to be converted + @return the new FontDescriptor + */ static ::com::sun::star::awt::FontDescriptor CreateFontDescriptor( const Font& rFont ); static Font CreateFont( const ::com::sun::star::awt::FontDescriptor& rDescr, const Font& rInitFont ); static Font CreateFont( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont >& rxFont ); diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index 6df61c0..3d275c1 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -305,7 +305,7 @@ FontWeight VCLUnoHelper::ConvertFontWeight( float f ) else if( f <= ::com::sun::star::awt::FontWeight::BLACK ) return WEIGHT_BLACK; - OSL_FAIL( "Unknown FontWeigth" ); + OSL_FAIL( "Unknown FontWeight" ); return WEIGHT_DONTKNOW; } commit ade27059dc2e1c84ab00023c15430ee6645617f7 Author: Caolán McNamara <[email protected]> Date: Tue Apr 16 10:15:19 2013 +0100 Updated core Project: help ed71cbfe7a4622e775e7355e7032c622d229b62b diff --git a/helpcontent2 b/helpcontent2 index 02312df..ed71cbf 160000 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 02312df0968c2d6e1aece678fab055ee59e82b07 +Subproject commit ed71cbfe7a4622e775e7355e7032c622d229b62b
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
