summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzabolcs Dezsi <dezsiszabi@hotmail.com>2012-03-06 11:16:07 +0100
committerAndras Timar <atimar@suse.com>2012-03-06 20:23:35 +0100
commit78e8d5f0d62f910b8561a1c4fd7ebd8ae4cfb9f8 (patch)
treeac1c904edd258cf816be463efb40f0cfc8a9430d
parent1889c1af41650576a29c587a0b2cdeaf0d297587 (diff)
Added option to hide external link buttons on Start Center
This option is useful for Intel AppUp builds. On the other hand, unused STARTCENTER_LAYOUT_STYLE option was removed.
-rw-r--r--framework/inc/framework.hrc14
-rw-r--r--framework/source/services/backingwindow.cxx98
-rw-r--r--framework/source/services/backingwindow.hxx9
-rw-r--r--framework/source/services/fwk_services.src8
-rw-r--r--instsetoo_native/util/openoffice.lst18
-rw-r--r--officecfg/registry/data/org/openoffice/Office/Common.xcu4
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Common.xcs6
7 files changed, 34 insertions, 123 deletions
diff --git a/framework/inc/framework.hrc b/framework/inc/framework.hrc
index e92e50ba3cda..0c81f4ab81a7 100644
--- a/framework/inc/framework.hrc
+++ b/framework/inc/framework.hrc
@@ -46,14 +46,12 @@
// ResIds for BackingWindow
#define DLG_BACKING (RID_FWK_DIALOG_START_CORRECT+100)
-#define STR_BACKING_WELCOME 1
-#define STR_BACKING_WELCOMEPRODUCT 2
-#define STR_BACKING_CREATE 3
-#define STR_BACKING_TEMPLATE 4
-#define STR_BACKING_FILE 5
-#define STR_BACKING_EXTHELP 6
-#define STR_BACKING_INFOHELP 7
-#define STR_BACKING_TPLREP 8
+#define STR_BACKING_CREATE 1
+#define STR_BACKING_TEMPLATE 2
+#define STR_BACKING_FILE 3
+#define STR_BACKING_EXTHELP 4
+#define STR_BACKING_INFOHELP 5
+#define STR_BACKING_TPLREP 6
#define RES_BACKING_IMAGES (DLG_BACKING+1)
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index 0b8976981840..6bdc1a45a6bc 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -137,8 +137,6 @@ class RecentFilesStringLength : public ::cppu::WeakImplHelper1< ::com::sun::star
BackingWindow::BackingWindow( Window* i_pParent ) :
Window( i_pParent, FwkResId( DLG_BACKING ) ),
- maWelcome( this, WB_LEFT ),
- maProduct( this, WB_LEFT ),
maWriterButton( this, STC_BUTTON_STYLE ),
maCalcButton( this, STC_BUTTON_STYLE ),
maImpressButton( this, STC_BUTTON_STYLE ),
@@ -148,13 +146,11 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
maMathButton( this, STC_BUTTON_STYLE ),
maTemplateButton( this, STC_BUTTON_STYLE ),
maToolbox( this, WB_DIALOGCONTROL ),
- maWelcomeString( FwkResId( STR_BACKING_WELCOME ) ),
- maProductString( FwkResId( STR_BACKING_WELCOMEPRODUCT ) ),
maOpenString( FwkResId( STR_BACKING_FILE ) ),
maTemplateString( FwkResId( STR_BACKING_TEMPLATE ) ),
maButtonImageSize( 10, 10 ),
mbInitControls( false ),
- mnLayoutStyle( 0 ),
+ mnHideExternalLinks( 0 ),
mpAccExec( NULL ),
mnBtnPos( 120 ),
mnBtnTop( 150 ),
@@ -179,8 +175,8 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
if( xNameAccess.is() )
{
//throws css::container::NoSuchElementException, css::lang::WrappedTargetException
- Any value( xNameAccess->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StartCenterLayoutStyle"))) );
- mnLayoutStyle = value.get<sal_Int32>();
+ Any value( xNameAccess->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StartCenterHideExternalLinks"))) );
+ mnHideExternalLinks = value.get<sal_Int32>();
}
}
}
@@ -195,8 +191,6 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
// clean up resource stack
FreeResource();
- maWelcome.SetPaintTransparent( sal_True );
- maProduct.SetPaintTransparent( sal_True );
EnableChildTransparentMode();
SetStyle( GetStyle() | WB_DIALOGCONTROL );
@@ -399,12 +393,6 @@ void BackingWindow::initBackground()
SetBackground();
bool bDark = GetSettings().GetStyleSettings().GetHighContrastMode();
- if( bDark )
- maWelcomeTextColor = maLabelTextColor = Color( COL_WHITE );
- else if( mnLayoutStyle == 1 )
- maWelcomeTextColor = maLabelTextColor = Color( COL_BLACK );
- else
- maWelcomeTextColor = maLabelTextColor = Color( 0x26, 0x35, 0x42 );
Color aTextBGColor( bDark ? COL_BLACK : COL_WHITE );
@@ -438,19 +426,6 @@ void BackingWindow::initBackground()
maToolbox.SetItemImage( nItemId_Info, BitmapEx( FwkResId( BMP_BACKING_INFO ) ) );
maToolbox.SetItemImage( nItemId_TplRep, BitmapEx( FwkResId( BMP_BACKING_TPLREP ) ) );
- maWelcome.SetControlForeground( maWelcomeTextColor );
- maWelcome.SetBackground();
- maProduct.SetControlForeground( maWelcomeTextColor );
- maProduct.SetBackground();
-
- if( mnLayoutStyle == 1 )
- {
- if( Application::GetSettings().GetLayoutRTL() )
- mnBtnPos = maBackgroundRight.GetSizePixel().Width() + 40;
- else
- mnBtnPos = maBackgroundLeft.GetSizePixel().Width() + 40;
- }
-
// get icon images from fwk resource and set them on the appropriate buttons
loadImage( FwkResId( BMP_BACKING_WRITER ), maWriterButton );
loadImage( FwkResId( BMP_BACKING_CALC ), maCalcButton );
@@ -482,56 +457,12 @@ void BackingWindow::initControls()
maControlRect.Bottom() -= nShadowBottom;
long nYPos = 0;
- // set bigger welcome string
- maWelcome.SetText( maWelcomeString );
- maTextFont = GetSettings().GetStyleSettings().GetLabelFont();
- maTextFont.SetSize( Size( 0, 18 ) );
- maTextFont.SetWeight( WEIGHT_BOLD );
- maWelcome.SetFont( maTextFont );
- // get metric to get correct width factor and adjust
- long nW = (maWelcome.GetFontMetric().GetWidth()*95)/100;
- maTextFont.SetSize( Size( nW, 18 ) );
-
- maWelcome.SetFont( maTextFont );
- maWelcome.SetControlFont( maTextFont );
- maWelcomeSize = Size( maWelcome.GetTextWidth( maWelcomeString ), maWelcome.GetTextHeight() );
- maWelcomeSize.Width() = (maWelcomeSize.Width() * 20)/19;
-
- nYPos += (maWelcomeSize.Height()*3)/2;
-
- if( maControlRect.GetWidth() < mnBtnPos + maWelcomeSize.Width() + 20 )
- maControlRect.Right() = maControlRect.Left() + maWelcomeSize.Width() + mnBtnPos + 20;
-
- nYPos += maWelcomeSize.Height();
-
- // set product string
- maTextFont.SetSize( Size( 0, 30 ) );
- maProduct.SetFont( maTextFont );
-
- // get metric to get correct width factor and adjust
- nW = (maProduct.GetFontMetric().GetWidth()*95)/100;
- maTextFont.SetSize( Size( nW, 28 ) );
-
- maProduct.SetFont( maTextFont );
- maProduct.SetControlFont( maTextFont );
- maProduct.SetText( maProductString );
- maProductSize = Size( maProduct.GetTextWidth( maProductString ), maProduct.GetTextHeight() );
- maProductSize.Width() = (maProductSize.Width() * 20)/19;
-
- if( maControlRect.GetWidth() < maProductSize.Width() + mnBtnPos + 10 )
- maControlRect.Right() = maControlRect.Left() + maProductSize.Width() + mnBtnPos + 10;
-
- if( mnLayoutStyle == 1 )
- {
- maWelcome.Show();
- maProduct.Show();
- }
- nYPos += (maProductSize.Height()*3)/2;
+ if( maControlRect.GetWidth() < mnBtnPos + 20 )
+ maControlRect.Right() = maControlRect.Left() + mnBtnPos + 20;
- // set a slighly larger font than normal labels on the texts
- maTextFont.SetSize( Size( 0, 11 ) );
- maTextFont.SetWeight( WEIGHT_NORMAL );
+ if( maControlRect.GetWidth() < mnBtnPos + 10 )
+ maControlRect.Right() = maControlRect.Left() + mnBtnPos + 10;
// collect the URLs of the entries in the File/New menu
SvtModuleOptions aModuleOptions;
@@ -629,7 +560,7 @@ void BackingWindow::initControls()
}
maToolbox.SetSelectHdl( LINK( this, BackingWindow, ToolboxHdl ) );
- if( mnLayoutStyle == 0 )
+ if( mnHideExternalLinks == 0 )
maToolbox.Show();
// scale middle map to formatted width
@@ -847,9 +778,9 @@ void BackingWindow::Resize()
// #i93631# squeeze controls so they fit into the box
// this can be necessary due to application font height which has small deviations
// from the size set
- const long nWDelta = maWelcomeSize.Height();
- const long nW2Delta = (maWelcomeSize.Height()*3)/2;
- const long nPDelta = (maProductSize.Height()*3)/2;
+ const long nWDelta = 0;
+ const long nW2Delta = 0;
+ const long nPDelta = 0;
const long nBDelta = maButtonImageSize.Height() + 10;
const long nB2Delta = 3*maButtonImageSize.Height()/2;
const long nLastDelta = maButtonImageSize.Height();
@@ -868,16 +799,13 @@ void BackingWindow::Resize()
long nYPos = maControlRect.Top();
nYPos += nW2Delta - nDiff;
- maWelcome.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos, nYPos ),
- Size( maControlRect.GetWidth() - mnBtnPos - 5, (maWelcomeSize.Height()*20)/19 ) );
+
nYPos += nWDelta - nDiff;
- maProduct.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos, nYPos ), Size( maControlRect.GetWidth() - mnBtnPos - 5, (maProductSize.Height()*20)/19 ) );
nYPos += nPDelta - nDiff;
nYPos += nWDelta/2 - nDiff;
- if( mnLayoutStyle != 1 )
- nYPos = maControlRect.Top() + mnBtnTop;
+ nYPos = maControlRect.Top() + mnBtnTop;
maWriterButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos, nYPos ), Size( mnTextColumnWidth[0], maButtonImageSize.Height() ) );
maDrawButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos + mnColumnWidth[0], nYPos ), Size( mnTextColumnWidth[1], maButtonImageSize.Height() ) );
diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx
index 179a632d5608..96eb9092c0b3 100644
--- a/framework/source/services/backingwindow.hxx
+++ b/framework/source/services/backingwindow.hxx
@@ -90,10 +90,6 @@ namespace framework
com::sun::star::uno::Reference<com::sun::star::frame::XFrame> mxFrame;
com::sun::star::uno::Reference<com::sun::star::document::XEventBroadcaster> mxBroadcaster;
- FixedText maWelcome;
- Size maWelcomeSize;
- FixedText maProduct;
- Size maProductSize;
ImageButton maWriterButton;
ImageButton maCalcButton;
ImageButton maImpressButton;
@@ -109,8 +105,6 @@ namespace framework
BitmapEx maBackgroundMiddle;
BitmapEx maBackgroundRight;
- String maWelcomeString;
- String maProductString;
String maCreateString;
String maOpenString;
String maTemplateString;
@@ -121,12 +115,11 @@ namespace framework
long mnColumnWidth[2];
long mnTextColumnWidth[2];
Color maLabelTextColor;
- Color maWelcomeTextColor;
Size maButtonImageSize;
bool mbInitControls;
- sal_Int32 mnLayoutStyle;
+ sal_Int32 mnHideExternalLinks;
svt::AcceleratorExecute* mpAccExec;
long mnBtnPos;
long mnBtnTop;
diff --git a/framework/source/services/fwk_services.src b/framework/source/services/fwk_services.src
index 536b3d7eaa2d..1905142f5de4 100644
--- a/framework/source/services/fwk_services.src
+++ b/framework/source/services/fwk_services.src
@@ -33,14 +33,6 @@ Window DLG_BACKING
SVLook = TRUE ;
Border = FALSE;
- String STR_BACKING_WELCOME
- {
- Text [ en-US ] = "Welcome to";
- };
- String STR_BACKING_WELCOMEPRODUCT
- {
- Text [ en-US ] = "%PRODUCTNAME";
- };
String STR_BACKING_CREATE
{
Text [ en-US ] = "Create a new document";
diff --git a/instsetoo_native/util/openoffice.lst b/instsetoo_native/util/openoffice.lst
index 718333c267d6..4dcde68683a3 100644
--- a/instsetoo_native/util/openoffice.lst
+++ b/instsetoo_native/util/openoffice.lst
@@ -36,8 +36,8 @@ Globals
WINDOWSPATCHLEVEL 8
OOOVENDOR The Document Foundation
OOODOWNLOADNAME 1
- STARTCENTER_LAYOUT_STYLE 0
BUILDIDCWS {buildidcws}
+ STARTCENTER_HIDE_EXTERNAL_LINKS 0
}
}
}
@@ -87,8 +87,8 @@ LibreOffice
STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/
STARTCENTER_INFO_URL http://www.libreoffice.org/
STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
- STARTCENTER_LAYOUT_STYLE 0
DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
+ STARTCENTER_HIDE_EXTERNAL_LINKS 0
}
active 1
compression 5
@@ -152,8 +152,8 @@ LibreOffice_Dev
STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/
STARTCENTER_INFO_URL http://www.libreoffice.org/
STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
- STARTCENTER_LAYOUT_STYLE 0
DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
+ STARTCENTER_HIDE_EXTERNAL_LINKS 0
}
active 1
compression 5
@@ -190,10 +190,10 @@ URE
STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/
STARTCENTER_INFO_URL http://www.libreoffice.org/
STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
- STARTCENTER_LAYOUT_STYLE 0
ADD_INCLUDE_FILES cliureversion.mk,clioootypesversion.mk
PACKAGEMAP package_names_ext.txt
DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
+ STARTCENTER_HIDE_EXTERNAL_LINKS 0
}
active 1
compression 5
@@ -234,8 +234,8 @@ LibreOffice_SDK
STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/
STARTCENTER_INFO_URL http://www.libreoffice.org/
STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
- STARTCENTER_LAYOUT_STYLE 0
DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
+ STARTCENTER_HIDE_EXTERNAL_LINKS 0
}
active 1
compression 5
@@ -282,8 +282,8 @@ LibreOffice_Dev_SDK
STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/
STARTCENTER_INFO_URL http://www.libreoffice.org/
STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
- STARTCENTER_LAYOUT_STYLE 0
DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
+ STARTCENTER_HIDE_EXTERNAL_LINKS 0
}
active 1
compression 5
@@ -324,8 +324,8 @@ LibreOffice_Test
STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/
STARTCENTER_INFO_URL http://www.libreoffice.org/
STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
- STARTCENTER_LAYOUT_STYLE 0
DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
+ STARTCENTER_HIDE_EXTERNAL_LINKS 0
}
active 1
compression 5
@@ -372,8 +372,8 @@ LibreOffice_Dev_Test
STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/
STARTCENTER_INFO_URL http://www.libreoffice.org/
STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
- STARTCENTER_LAYOUT_STYLE 0
DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
+ STARTCENTER_HIDE_EXTERNAL_LINKS 0
}
active 1
compression 5
@@ -432,8 +432,8 @@ OxygenOffice
STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/
STARTCENTER_INFO_URL http://www.libreoffice.org/
STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
- STARTCENTER_LAYOUT_STYLE 0
DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
+ STARTCENTER_HIDE_EXTERNAL_LINKS 0
}
active 1
compression 5
diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index 744c7f216021..7ea1461e5905 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -138,8 +138,8 @@
<prop oor:name="TemplateRepositoryURL" oor:type="xs:string">
<value>${STARTCENTER_TEMPLREP_URL}</value>
</prop>
- <prop oor:name="StartCenterLayoutStyle" oor:type="xs:int">
- <value>${STARTCENTER_LAYOUT_STYLE}</value>
+ <prop oor:name="StartCenterHideExternalLinks" oor:type="xs:int">
+ <value>${STARTCENTER_HIDE_EXTERNAL_LINKS}</value>
</prop>
</node>
<node oor:name="Registration">
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 6a8f8460b9d8..483fc2d3aa7a 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -4144,11 +4144,11 @@
<value/>
</prop>
<prop
- oor:name="StartCenterLayoutStyle" oor:type="xs:int"
+ oor:name="StartCenterHideExternalLinks" oor:type="xs:int"
oor:nillable="false">
<info>
- <desc>Contains a number deciding the layout style of the start
- center</desc>
+ <desc>Contains a number deciding whether to show or hide buttons
+ with external links</desc>
</info>
<value>0</value>
</prop>