[Libreoffice-commits] .: 6 commits - cui/source
Caolán McNamara
caolan at kemper.freedesktop.org
Tue Jun 28 05:35:47 PDT 2011
cui/source/dialogs/about.cxx | 231 ++++++++++++-------------------------------
cui/source/dialogs/about.hrc | 7 -
cui/source/dialogs/about.src | 10 +
cui/source/inc/about.hxx | 13 --
4 files changed, 76 insertions(+), 185 deletions(-)
New commits:
commit b6180157870d2b2dbde9c3624e466e582c17f48f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 28 13:26:48 2011 +0100
pretty this up a bit
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 3241a47..8ef7a32 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -81,6 +81,7 @@ GetBuildId()
//strip trailing - from ./g log
if (!sBuildId.isEmpty() && sBuildId.getStr()[sBuildId.getLength()-1] == '-')
{
+ sBuildId = sBuildId.copy(0, sBuildId.getLength()-1);
rtl::OUStringBuffer aBuffer;
sal_Int32 nIndex = 0;
do
@@ -89,10 +90,13 @@ GetBuildId()
if (!aToken.isEmpty())
{
aBuffer.append(aToken);
- if (nIndex % 5)
- aBuffer.append(static_cast<sal_Unicode>('-'));
- else
- aBuffer.append(static_cast<sal_Unicode>('\n'));
+ if (nIndex >= 0)
+ {
+ if (nIndex % 5)
+ aBuffer.append(static_cast<sal_Unicode>('-'));
+ else
+ aBuffer.append(static_cast<sal_Unicode>('\n'));
+ }
}
}
while ( nIndex >= 0 );
commit a8f702693090d15c1f8d71ae78b68698d64a427d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 28 13:00:51 2011 +0100
break build id into multiple lines if using g log
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 4556904..3241a47 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -72,13 +72,34 @@ Image SfxApplication::GetApplicationLogo()
return Image( aBitmap );
}
-/* intense magic to get strong version information */
+/* get good version information */
static String
GetBuildId()
{
rtl::OUString sDefault;
- String sBuildId( utl::Bootstrap::getBuildIdData( sDefault ) );
- OSL_ENSURE( sBuildId.Len() > 0, "No BUILDID in bootstrap file" );
+ rtl::OUString sBuildId( utl::Bootstrap::getBuildIdData( sDefault ) );
+ //strip trailing - from ./g log
+ if (!sBuildId.isEmpty() && sBuildId.getStr()[sBuildId.getLength()-1] == '-')
+ {
+ rtl::OUStringBuffer aBuffer;
+ sal_Int32 nIndex = 0;
+ do
+ {
+ rtl::OUString aToken = sBuildId.getToken( 0, '-', nIndex );
+ if (!aToken.isEmpty())
+ {
+ aBuffer.append(aToken);
+ if (nIndex % 5)
+ aBuffer.append(static_cast<sal_Unicode>('-'));
+ else
+ aBuffer.append(static_cast<sal_Unicode>('\n'));
+ }
+ }
+ while ( nIndex >= 0 );
+ sBuildId = aBuffer.makeStringAndClear();
+ }
+
+ OSL_ENSURE( sBuildId.getLength() > 0, "No BUILDID in bootstrap file" );
return sBuildId;
}
commit ec9c985bfdb84d6c4feeae0ab21e0214d79d8d7a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 28 13:00:24 2011 +0100
add Build Id: string and fix size calculations
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index debe809..4556904 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -92,7 +92,8 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
aInfoLink ( this, ResId( ABOUT_FTXT_LINK, *rId.GetResMgr() ) ),
aVersionTextStr( ResId( ABOUT_STR_VERSION, *rId.GetResMgr() ) ),
aCopyrightTextStr( ResId( ABOUT_STR_COPYRIGHT, *rId.GetResMgr() ) ),
- aLinkStr ( ResId( ABOUT_STR_LINK, *rId.GetResMgr() ) )
+ aLinkStr ( ResId( ABOUT_STR_LINK, *rId.GetResMgr() ) ),
+ m_sBuildStr(ResId(ABOUT_STR_BUILD, *rId.GetResMgr()))
{
rtl::OUString sProduct;
utl::ConfigManager::GetDirectConfigProperty(utl::ConfigManager::PRODUCTNAME) >>= sProduct;
@@ -109,6 +110,8 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
String sVersion = aVersionTextStr;
sVersion.SearchAndReplaceAscii( "$(VER)", Application::GetDisplayName() );
sVersion += '\n';
+ sVersion += m_sBuildStr;
+ sVersion += ' ';
sVersion += GetBuildId();
#ifdef BUILD_VER_STRING
String aBuildString( DEFINE_CONST_UNICODE( BUILD_VER_STRING ) );
@@ -146,52 +149,51 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
if (aAppLogoSiz.Width() < 300)
aAppLogoSiz.Width() = 300;
- Size aOutSiz = GetOutputSizePixel();
- aOutSiz.Width() = aAppLogoSiz.Width();
+ Size aOutSiz = GetOutputSizePixel();
+ aOutSiz.Width() = aAppLogoSiz.Width();
// analyze size of the aVersionText widget
// character size
Size a6Size = aVersionText.LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
// preferred Version widget size
- Size aVTSize = aVersionText.CalcMinimumSize();
long nY = aAppLogoSiz.Height() + ( a6Size.Height() * 2 );
long nDlgMargin = a6Size.Width() * 3 ;
long nCtrlMargin = a6Size.Height() * 2;
long nTextWidth = aOutSiz.Width() - nDlgMargin;
// finally set the aVersionText widget position and size
- Size aVTCopySize = aVTSize;
- Point aVTCopyPnt;
- aVTCopySize.Width() = nTextWidth;
- aVTCopyPnt.X() = ( aOutSiz.Width() - aVTCopySize.Width() ) / 2;
- aVTCopyPnt.Y() = nY;
- aVersionText.SetPosSizePixel( aVTCopyPnt, aVTCopySize );
+ Size aVTSize = aVersionText.GetSizePixel();
+ aVTSize.Width() = nTextWidth;
+ aVersionText.SetSizePixel(aVTSize);
+ aVTSize = aVersionText.CalcMinimumSize();
+ Point aVTPnt;
+ aVTPnt.X() = ( aOutSiz.Width() - aVTSize.Width() ) / 2;
+ aVTPnt.Y() = nY;
+ aVersionText.SetPosSizePixel( aVTPnt, aVTSize );
- nY += aVTSize.Height();
- nY += nCtrlMargin;
+ nY += aVTSize.Height() + nCtrlMargin;
// Multiline edit with Copyright-Text
// preferred Version widget size
- Size aCTSize = aCopyrightText.CalcMinimumSize();
+ Size aCTSize = aCopyrightText.GetSizePixel();
+ aCTSize.Width() = nTextWidth;
+ aCopyrightText.SetSizePixel(aCTSize);
+ aCTSize = aCopyrightText.CalcMinimumSize();
+ Point aCTPnt;
+ aCTPnt.X() = ( aOutSiz.Width() - aCTSize.Width() ) / 2;
+ aCTPnt.Y() = nY;
+ aCopyrightText.SetPosSizePixel( aCTPnt, aCTSize );
- Size aCTCopySize = aCTSize;
- Point aCTCopyPnt;
- aCTCopySize.Width() = nTextWidth;
- aCTCopyPnt.X() = ( aOutSiz.Width() - aCTCopySize.Width() ) / 2;
- aCTCopyPnt.Y() = nY;
- aCopyrightText.SetPosSizePixel( aCTCopyPnt, aCTCopySize );
-
- nY += aCTSize.Height();
- nY += nCtrlMargin;
+ nY += aCTSize.Height() + nCtrlMargin;
// FixedHyperlink with more info link
- Size aLinkSize = aInfoLink.CalcMinimumSize();
- Point aLinkPnt;
- aLinkPnt.X() = ( aOutSiz.Width() - aLinkSize.Width() ) / 2;
- aLinkPnt.Y() = nY;
- aInfoLink.SetPosSizePixel( aLinkPnt, aLinkSize );
+ Size aLTSize = aInfoLink.CalcMinimumSize();
+ Point aLTPnt;
+ aLTPnt.X() = ( aOutSiz.Width() - aLTSize.Width() ) / 2;
+ aLTPnt.Y() = nY;
+ aInfoLink.SetPosSizePixel( aLTPnt, aLTSize );
- nY += aLinkSize.Height() + nCtrlMargin;
+ nY += aLTSize.Height() + nCtrlMargin;
// OK-Button-Position (at the bottom and centered)
Size aOKSiz = aOKButton.GetSizePixel();
diff --git a/cui/source/dialogs/about.hrc b/cui/source/dialogs/about.hrc
index f10ee8f..dfc71c4 100644
--- a/cui/source/dialogs/about.hrc
+++ b/cui/source/dialogs/about.hrc
@@ -31,6 +31,7 @@
#define ABOUT_FTXT_VERSION 2
#define ABOUT_FTXT_COPYRIGHT 3
#define ABOUT_FTXT_LINK 4
-#define ABOUT_STR_VERSION 5
-#define ABOUT_STR_COPYRIGHT 6
-#define ABOUT_STR_LINK 7
+#define ABOUT_STR_BUILD 5
+#define ABOUT_STR_VERSION 6
+#define ABOUT_STR_COPYRIGHT 7
+#define ABOUT_STR_LINK 8
diff --git a/cui/source/dialogs/about.src b/cui/source/dialogs/about.src
index f2542c6..383fc29 100644
--- a/cui/source/dialogs/about.src
+++ b/cui/source/dialogs/about.src
@@ -80,4 +80,8 @@ ModalDialog RID_DEFAULTABOUT
{
Text[ en-US ] = "http://www.libreoffice.org/credits.html";
};
+ String ABOUT_STR_BUILD
+ {
+ Text[ en-US ] = "Build ID:";
+ };
};
diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx
index c5f2a02..2643f46 100644
--- a/cui/source/inc/about.hxx
+++ b/cui/source/inc/about.hxx
@@ -57,6 +57,7 @@ private:
String aVersionTextStr;
String aCopyrightTextStr;
String aLinkStr;
+ String m_sBuildStr;
protected:
virtual sal_Bool Close();
commit 82f0228a9158410f4a20f59e28d8060c1aca2036
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 28 12:15:44 2011 +0100
center text inside edit box
diff --git a/cui/source/dialogs/about.src b/cui/source/dialogs/about.src
index 56a28be..f2542c6 100644
--- a/cui/source/dialogs/about.src
+++ b/cui/source/dialogs/about.src
@@ -33,7 +33,6 @@ ModalDialog RID_DEFAULTABOUT
Size = MAP_APPFONT ( 245 , 280 ) ;
Moveable = TRUE ;
SVLook = TRUE ;
-// TEXT_DEFAULTABOUT
OKButton ABOUT_BTN_OK
{
DefButton = TRUE ;
@@ -57,6 +56,9 @@ ModalDialog RID_DEFAULTABOUT
IgnoreTab = TRUE ;
ReadOnly = TRUE ;
AutoVScroll = TRUE ;
+ LEFT = FALSE ;
+ CENTER = TRUE ;
+ RIGHT = FALSE ;
};
FixedText ABOUT_FTXT_LINK
{
commit 49adde14ef614cb9503537137a0a2b9efcb1718e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 28 11:57:55 2011 +0100
ditch used stuff, and make it less horrifically ugly
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 3759bba..debe809 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -90,14 +90,9 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
aVersionText ( this, ResId( ABOUT_FTXT_VERSION, *rId.GetResMgr() ) ),
aCopyrightText ( this, ResId( ABOUT_FTXT_COPYRIGHT, *rId.GetResMgr() ) ),
aInfoLink ( this, ResId( ABOUT_FTXT_LINK, *rId.GetResMgr() ) ),
- aAccelStr ( ResId( ABOUT_STR_ACCEL, *rId.GetResMgr() ) ),
aVersionTextStr( ResId( ABOUT_STR_VERSION, *rId.GetResMgr() ) ),
aCopyrightTextStr( ResId( ABOUT_STR_COPYRIGHT, *rId.GetResMgr() ) ),
- aLinkStr ( ResId( ABOUT_STR_LINK, *rId.GetResMgr() ) ),
- aTimer (),
- nOff ( 0 ),
- m_nDeltaWidth ( 0 ),
- m_nPendingScrolls( 0 )
+ aLinkStr ( ResId( ABOUT_STR_LINK, *rId.GetResMgr() ) )
{
rtl::OUString sProduct;
utl::ConfigManager::GetDirectConfigProperty(utl::ConfigManager::PRODUCTNAME) >>= sProduct;
@@ -122,28 +117,6 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
#endif
aVersionText.SetText( sVersion );
- // Initialization call for developers
- if ( aAccelStr.Len() && ByteString(U2S(aAccelStr)).IsAlphaAscii() )
- {
- Accelerator *pAccel = 0, *pPrevAccel = 0, *pFirstAccel = 0;
- aAccelStr.ToUpperAscii();
-
- for ( sal_uInt16 i = 0; i < aAccelStr.Len(); ++i )
- {
- pPrevAccel = pAccel;
- pAccel = new Accelerator;
- aAccelList.push_back( pAccel );
- sal_uInt16 nKey = aAccelStr.GetChar(i) - 'A' + KEY_A;
- pAccel->InsertItem( 1, KeyCode( nKey, KEY_MOD1 ) );
- if ( i > 0 )
- pPrevAccel->SetAccel( 1, pAccel );
- if ( i == 0 )
- pFirstAccel = pAccel;
- }
- pAccel->SetSelectHdl( LINK( this, AboutDialog, AccelSelectHdl ) );
- GetpApp()->InsertAccel( pFirstAccel );
- }
-
// set for background and text the correct system color
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
Color aWhiteCol( rSettings.GetWindowColor() );
@@ -183,51 +156,55 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
Size aVTSize = aVersionText.CalcMinimumSize();
long nY = aAppLogoSiz.Height() + ( a6Size.Height() * 2 );
long nDlgMargin = a6Size.Width() * 3 ;
- long nCtrlMargin = aVTSize.Height() + ( a6Size.Height() * 2 );
+ long nCtrlMargin = a6Size.Height() * 2;
long nTextWidth = aOutSiz.Width() - nDlgMargin;
// finally set the aVersionText widget position and size
Size aVTCopySize = aVTSize;
Point aVTCopyPnt;
- aVTCopySize.Width() = nTextWidth;
+ aVTCopySize.Width() = nTextWidth;
aVTCopyPnt.X() = ( aOutSiz.Width() - aVTCopySize.Width() ) / 2;
aVTCopyPnt.Y() = nY;
aVersionText.SetPosSizePixel( aVTCopyPnt, aVTCopySize );
+ nY += aVTSize.Height();
nY += nCtrlMargin;
-
- // OK-Button-Position (at the bottom and centered)
- Size aOKSiz = aOKButton.GetSizePixel();
- Point aOKPnt = aOKButton.GetPosPixel();
-
- // FixedHyperlink with more info link
- Point aLinkPnt = aInfoLink.GetPosPixel();
- Size aLinkSize = aInfoLink.GetSizePixel();
// Multiline edit with Copyright-Text
- Point aCopyPnt = aCopyrightText.GetPosPixel();
- Size aCopySize = aCopyrightText.GetSizePixel();
- aCopySize.Width() = nTextWidth;
- aCopySize.Height() = aOutSiz.Height() - nY - ( aOKSiz.Height() * 2 ) - 3*aLinkSize.Height() - nCtrlMargin;
+ // preferred Version widget size
+ Size aCTSize = aCopyrightText.CalcMinimumSize();
- aCopyPnt.X() = ( aOutSiz.Width() - aCopySize.Width() ) / 2;
- aCopyPnt.Y() = nY;
- aCopyrightText.SetPosSizePixel( aCopyPnt, aCopySize );
+ Size aCTCopySize = aCTSize;
+ Point aCTCopyPnt;
+ aCTCopySize.Width() = nTextWidth;
+ aCTCopyPnt.X() = ( aOutSiz.Width() - aCTCopySize.Width() ) / 2;
+ aCTCopyPnt.Y() = nY;
+ aCopyrightText.SetPosSizePixel( aCTCopyPnt, aCTCopySize );
- nY += aCopySize.Height() + aLinkSize.Height();
+ nY += aCTSize.Height();
+ nY += nCtrlMargin;
- aLinkSize.Width() = aInfoLink.CalcMinimumSize().Width();
+ // FixedHyperlink with more info link
+ Size aLinkSize = aInfoLink.CalcMinimumSize();
+ Point aLinkPnt;
aLinkPnt.X() = ( aOutSiz.Width() - aLinkSize.Width() ) / 2;
aLinkPnt.Y() = nY;
aInfoLink.SetPosSizePixel( aLinkPnt, aLinkSize );
nY += aLinkSize.Height() + nCtrlMargin;
+ // OK-Button-Position (at the bottom and centered)
+ Size aOKSiz = aOKButton.GetSizePixel();
+ Point aOKPnt;
aOKPnt.X() = ( aOutSiz.Width() - aOKSiz.Width() ) / 2;
aOKPnt.Y() = nY;
aOKButton.SetPosPixel( aOKPnt );
- // Change the width of the dialog
+ nY += aOKSiz.Height() + nCtrlMargin;
+
+ aOutSiz.Height() = nY;
+
+ // Change the size of the dialog
SetOutputSizePixel( aOutSiz );
FreeResource();
@@ -238,50 +215,6 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
// -----------------------------------------------------------------------
-AboutDialog::~AboutDialog()
-{
- // Clearing the developers call
- if ( !aAccelList.empty() )
- {
- GetpApp()->RemoveAccel( aAccelList.front() );
-
- for ( size_t i = 0, n = aAccelList.size(); i < n; ++i )
- delete aAccelList[ i ];
- aAccelList.clear();
- }
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( AboutDialog, TimerHdl, Timer *, pTimer )
-{
- (void)pTimer; //unused
- ++m_nPendingScrolls;
- Invalidate( INVALIDATE_NOERASE | INVALIDATE_NOCHILDREN );
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( AboutDialog, AccelSelectHdl, Accelerator *, pAccelerator )
-{
- (void)pAccelerator; //unused
- // init Timer
- aTimer.SetTimeoutHdl( LINK( this, AboutDialog, TimerHdl ) );
-
- // init scroll mode
- nOff = GetOutputSizePixel().Height();
- MapMode aMapMode( MAP_PIXEL );
- SetMapMode( aMapMode );
-
- // start scroll Timer
- aTimer.SetTimeout( SCROLL_TIMER );
- aTimer.Start();
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
IMPL_LINK( AboutDialog, HandleHyperlink, svt::FixedHyperlink*, pHyperlink )
{
rtl::OUString sURL=pHyperlink->GetURL();
@@ -312,15 +245,12 @@ IMPL_LINK( AboutDialog, HandleHyperlink, svt::FixedHyperlink*, pHyperlink )
void AboutDialog::Paint( const Rectangle& rRect )
{
SetClipRegion( rRect );
-
- Point aPos( m_nDeltaWidth / 2, 0 );
+ Point aPos( 0, 0 );
DrawImage( aPos, aAppLogo );
}
sal_Bool AboutDialog::Close()
{
- // stop Timer and finish the dialog
- aTimer.Stop();
EndDialog( RET_OK );
return sal_False;
}
diff --git a/cui/source/dialogs/about.hrc b/cui/source/dialogs/about.hrc
index 7a74954..f10ee8f 100644
--- a/cui/source/dialogs/about.hrc
+++ b/cui/source/dialogs/about.hrc
@@ -29,10 +29,8 @@
#define ABOUT_BTN_OK 1
#define ABOUT_FTXT_VERSION 2
-#define ABOUT_STR_ACCEL 3
-#define ABOUT_FTXT_COPYRIGHT 4
-
-#define ABOUT_FTXT_LINK 5
-#define ABOUT_STR_VERSION 6
-#define ABOUT_STR_COPYRIGHT 7
-#define ABOUT_STR_LINK 8
+#define ABOUT_FTXT_COPYRIGHT 3
+#define ABOUT_FTXT_LINK 4
+#define ABOUT_STR_VERSION 5
+#define ABOUT_STR_COPYRIGHT 6
+#define ABOUT_STR_LINK 7
diff --git a/cui/source/dialogs/about.src b/cui/source/dialogs/about.src
index 1bea545..56a28be 100644
--- a/cui/source/dialogs/about.src
+++ b/cui/source/dialogs/about.src
@@ -72,14 +72,10 @@ ModalDialog RID_DEFAULTABOUT
};
String ABOUT_STR_COPYRIGHT
{
- Text[ en-US ] = "Copyright © 2000, 2010 LibreOffice contributors and/or their affiliates. All rights reserved.\nThis product was created by %OOOVENDOR, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.\n%OOOVENDOR acknowledges all community members, please find more info at the link below:";
+ Text[ en-US ] = "Copyright © 2000, 2010 LibreOffice contributors and/or their affiliates. All rights reserved.\n\nThis product was created by %OOOVENDOR, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.\n\n%OOOVENDOR acknowledges all community members, please find more info at the link below:";
};
String ABOUT_STR_LINK
{
Text[ en-US ] = "http://www.libreoffice.org/credits.html";
};
- String ABOUT_STR_ACCEL
- {
- Text = "SDT" ;
- };
};
diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx
index 86ead1d..c5f2a02 100644
--- a/cui/source/inc/about.hxx
+++ b/cui/source/inc/about.hxx
@@ -53,30 +53,18 @@ private:
MultiLineEdit aCopyrightText;
svt::FixedHyperlink aInfoLink;
-// ResStringArray aDeveloperAry; // RIP ...
- String aAccelStr;
String aVersionData;
String aVersionTextStr;
String aCopyrightTextStr;
String aLinkStr;
- AccelList aAccelList;
-
- AutoTimer aTimer;
- long nOff;
- long m_nDeltaWidth;
- int m_nPendingScrolls;
-
protected:
virtual sal_Bool Close();
virtual void Paint( const Rectangle& rRect );
public:
AboutDialog( Window* pParent, const ResId& rId);
- ~AboutDialog();
- DECL_LINK( TimerHdl, Timer * );
- DECL_LINK( AccelSelectHdl, Accelerator * );
DECL_LINK( HandleHyperlink, svt::FixedHyperlink * );
};
commit 66636d6f5637e381994b85549e41c8803e9918e0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 28 10:40:04 2011 +0100
throw out CWS_WORK_STAMP stuff
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index cd2e416..3759bba 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -76,65 +76,9 @@ Image SfxApplication::GetApplicationLogo()
static String
GetBuildId()
{
- const String sCWSSchema( String::CreateFromAscii( "[CWS:" ) );
rtl::OUString sDefault;
String sBuildId( utl::Bootstrap::getBuildIdData( sDefault ) );
OSL_ENSURE( sBuildId.Len() > 0, "No BUILDID in bootstrap file" );
- if ( sBuildId.Len() > 0 && sBuildId.Search( sCWSSchema ) == STRING_NOTFOUND )
- {
- // no cws part in brand buildid -> try basis buildid
- rtl::OUString sBasisBuildId( DEFINE_CONST_OUSTRING("${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":buildid}" ) );
- rtl::Bootstrap::expandMacros( sBasisBuildId );
- sal_Int32 nIndex = sBasisBuildId.indexOf( sCWSSchema );
- if ( nIndex != -1 )
- sBuildId += String( sBasisBuildId.copy( nIndex ) );
- }
-
- String sProductSource( utl::Bootstrap::getProductSource( sDefault ) );
- OSL_ENSURE( sProductSource.Len() > 0, "No ProductSource in bootstrap file" );
-
- // the product source is something like "DEV300", where the
- // build id is something like "300m12(Build:12345)". For better readability,
- // strip the duplicate UPD ("300").
- if ( sProductSource.Len() )
- {
- bool bMatchingUPD =
- ( sProductSource.Len() >= 3 )
- && ( sBuildId.Len() >= 3 )
- && ( sProductSource.Copy( sProductSource.Len() - 3 ) == sBuildId.Copy( 0, 3 ) );
- OSL_ENSURE( bMatchingUPD, "BUILDID and ProductSource do not match in their UPD" );
- if ( bMatchingUPD )
- sProductSource = sProductSource.Copy( 0, sProductSource.Len() - 3 );
-
- // prepend the product source
- sBuildId.Insert( sProductSource, 0 );
- }
-
- // Version information (in about box) (#i94693#)
- /* if the build ids of the basis or ure layer are different from the build id
- * of the brand layer then show them */
- rtl::OUString aBasisProductBuildId( DEFINE_CONST_OUSTRING("${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":ProductBuildid}" ) );
- rtl::Bootstrap::expandMacros( aBasisProductBuildId );
- rtl::OUString aUREProductBuildId( DEFINE_CONST_OUSTRING("${$URE_BIN_DIR/" SAL_CONFIGFILE("version") ":ProductBuildid}" ) );
- rtl::Bootstrap::expandMacros( aUREProductBuildId );
- if ( sBuildId.Search( String( aBasisProductBuildId ) ) == STRING_NOTFOUND
- || sBuildId.Search( String( aUREProductBuildId ) ) == STRING_NOTFOUND )
- {
- String sTemp( '-' );
- sTemp += String( aBasisProductBuildId );
- sTemp += '-';
- sTemp += String( aUREProductBuildId );
- sBuildId.Insert( sTemp, sBuildId.Search( ')' ) );
- }
-
- // the build id format is "milestone(build)[cwsname]". For readability, it would
- // be nice to have some more spaces in there.
- xub_StrLen nPos = 0;
- if ( ( nPos = sBuildId.Search( sal_Unicode( '(' ) ) ) != STRING_NOTFOUND )
- sBuildId.Insert( sal_Unicode( ' ' ), nPos );
- if ( ( nPos = sBuildId.Search( sal_Unicode( '[' ) ) ) != STRING_NOTFOUND )
- sBuildId.Insert( sal_Unicode( ' ' ), nPos );
-
return sBuildId;
}
More information about the Libreoffice-commits
mailing list