summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-06-05 13:08:32 +0000
committerKurt Zenker <kz@openoffice.org>2009-06-05 13:08:32 +0000
commitf06a4979f9e2474d1b0e446121cdec03eaf070cf (patch)
treeab976250ee7a42db1c93fbed9e78416b04ae73ee
parent048e7daec45c04ebd2ed4506a585f1719efc7f56 (diff)
CWS-TOOLING: integrate CWS c06v7_DEV300
2009-05-13 14:39:35 +0200 obo r271861 : #158157# resync to OOO310_m11
-rw-r--r--svtools/source/contnr/templwin.cxx17
-rw-r--r--svtools/source/contnr/templwin.src14
-rw-r--r--vcl/unx/source/fontmanager/fontconfig.cxx22
-rw-r--r--vcl/unx/source/fontmanager/fontmanager.cxx2
4 files changed, 40 insertions, 15 deletions
diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx
index 042088d317bb..2b212fdcffeb 100644
--- a/svtools/source/contnr/templwin.cxx
+++ b/svtools/source/contnr/templwin.cxx
@@ -35,6 +35,7 @@
#include <svtools/svtdata.hxx>
#include <svtools/pathoptions.hxx>
#include <svtools/dynamicmenuoptions.hxx>
+#include <svtools/extendedsecurityoptions.hxx>
#include <svtools/xtextedt.hxx>
#include <svtools/inettype.hxx>
#include "imagemgr.hxx"
@@ -1742,9 +1743,16 @@ void SvtDocumentTemplateDialog::InitImpl( )
pImpl = new SvtTmplDlg_Impl( this );
pImpl->aTitle = GetText();
+ bool bHideLink = ( SvtExtendedSecurityOptions().GetOpenHyperlinkMode()
+ == SvtExtendedSecurityOptions::OPEN_NEVER );
+ if ( !bHideLink )
+ {
aMoreTemplatesLink.SetURL( String(
RTL_CONSTASCII_STRINGPARAM( "http://templates.services.openoffice.org/?cid=923508" ) ) );
aMoreTemplatesLink.SetClickHdl( LINK( this, SvtDocumentTemplateDialog, OpenLinkHdl_Impl ) );
+ }
+ else
+ aMoreTemplatesLink.Hide();
aManageBtn.SetClickHdl( LINK( this, SvtDocumentTemplateDialog, OrganizerHdl_Impl ) );
Link aLink = LINK( this, SvtDocumentTemplateDialog, OKHdl_Impl );
@@ -1762,14 +1770,17 @@ void SvtDocumentTemplateDialog::InitImpl( )
Size aSize = GetOutputSizePixel();
Point aPos = aMoreTemplatesLink.GetPosPixel();
Size a6Size = LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
- aPos.Y() -= a6Size.Height();
+ if ( bHideLink )
+ aPos.Y() += aMoreTemplatesLink.GetSizePixel().Height();
+ else
+ aPos.Y() -= a6Size.Height();
long nDelta = aPos.Y() - nHeight;
aSize.Height() -= nDelta;
SetOutputSizePixel( aSize );
aSize.Height() = nHeight;
- aSize.Width() -= a6Size.Width();
- pImpl->pWin->SetPosSizePixel( Point( a6Size.Width() / 2, 0 ), aSize );
+ aSize.Width() -= ( a6Size.Width() * 2 );
+ pImpl->pWin->SetPosSizePixel( Point( a6Size.Width(), 0 ), aSize );
aPos = aMoreTemplatesLink.GetPosPixel();
aPos.Y() -= nDelta;
diff --git a/svtools/source/contnr/templwin.src b/svtools/source/contnr/templwin.src
index c8b9c4d58123..30149de4da14 100644
--- a/svtools/source/contnr/templwin.src
+++ b/svtools/source/contnr/templwin.src
@@ -275,7 +275,7 @@ ModalDialog DLG_DOCTEMPLATE
HelpId = HID_TEMPLATEDLG_DIALOG ;
OutputSize = TRUE ;
SVLook = TRUE ;
- Size = MAP_APPFONT( 320, 245 );
+ Size = MAP_APPFONT( 320, 250 );
Text [ en-US ] = "Templates and Documents" ;
Moveable = TRUE ;
FixedText FT_DOCTEMPLATE_LINK
@@ -288,35 +288,35 @@ ModalDialog DLG_DOCTEMPLATE
FixedLine FL_DOCTEMPLATE
{
Pos = MAP_APPFONT( 0, 219 );
- Size = MAP_APPFONT( 320, 1 );
+ Size = MAP_APPFONT( 320, 8 );
};
PushButton BTN_DOCTEMPLATE_MANAGE
{
- Pos = MAP_APPFONT( 3, 225 );
+ Pos = MAP_APPFONT( 6, 230 );
Size = MAP_APPFONT( 50, 14 );
Text [ en-US ] = "Organi~ze...";
};
PushButton BTN_DOCTEMPLATE_EDIT
{
- Pos = MAP_APPFONT( 56, 225 );
+ Pos = MAP_APPFONT( 59, 230 );
Size = MAP_APPFONT( 50, 14 );
Text [ en-US ] = "~Edit";
};
OKButton BTN_DOCTEMPLATE_OPEN
{
- Pos = MAP_APPFONT( 158, 225 );
+ Pos = MAP_APPFONT( 155, 230 );
Size = MAP_APPFONT( 50, 14 );
DefButton = TRUE;
Text [ en-US ] = "~Open";
};
CancelButton BTN_DOCTEMPLATE_CANCEL
{
- Pos = MAP_APPFONT( 211, 225 );
+ Pos = MAP_APPFONT( 208, 230 );
Size = MAP_APPFONT( 50, 14 );
};
HelpButton BTN_DOCTEMPLATE_HELP
{
- Pos = MAP_APPFONT( 267, 225 );
+ Pos = MAP_APPFONT( 264, 230 );
Size = MAP_APPFONT( 50, 14 );
};
};
diff --git a/vcl/unx/source/fontmanager/fontconfig.cxx b/vcl/unx/source/fontmanager/fontconfig.cxx
index c44e082f91bd..bc0dae480d31 100644
--- a/vcl/unx/source/fontmanager/fontconfig.cxx
+++ b/vcl/unx/source/fontmanager/fontconfig.cxx
@@ -91,6 +91,7 @@ class FontCfgWrapper
oslModule m_pLib;
FcFontSet* m_pOutlineSet;
+ int m_nFcVersion;
FcBool (*m_pFcInit)();
int (*m_pFcGetVersion)();
FcConfig* (*m_pFcConfigGetCurrent)();
@@ -248,9 +249,10 @@ oslGenericFunction FontCfgWrapper::loadSymbol( const char* pSymbol )
FontCfgWrapper::FontCfgWrapper()
: m_pLib( NULL ),
- m_pOutlineSet( NULL )
+ m_pOutlineSet( NULL ),
+ m_nFcVersion( 0 )
{
- OUString aLib( RTL_CONSTASCII_USTRINGPARAM( "libfontconfig.so.1" ) );
+ OUString aLib( RTL_CONSTASCII_USTRINGPARAM( "libfontconfig.so.1" ) );
m_pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY );
if( !m_pLib )
{
@@ -331,6 +333,19 @@ FontCfgWrapper::FontCfgWrapper()
m_pFcFreeTypeCharIndex = (FT_UInt(*)(FT_Face,FcChar32))
loadSymbol( "FcFreeTypeCharIndex" );
+ m_nFcVersion = FcGetVersion();
+#if (OSL_DEBUG_LEVEL > 1)
+ fprintf( stderr,"FC_VERSION = %05d\n", m_nFcVersion );
+#endif
+ // make minimum version configurable
+ const char* pMinFcVersion = getenv( "SAL_MIN_FC_VERSION");
+ if( pMinFcVersion )
+ {
+ const int nMinFcVersion = atoi( pMinFcVersion );
+ if( m_nFcVersion < nMinFcVersion )
+ m_pFcInit = NULL;
+ }
+
if( ! (
m_pFcInit &&
m_pFcGetVersion &&
@@ -416,8 +431,7 @@ FcFontSet* FontCfgWrapper::getFontSet()
{
m_pOutlineSet = FcFontSetCreate();
addFontSet( FcSetSystem );
- const int nVersion = FcGetVersion();
- if( nVersion > 20400 )
+ if( m_nFcVersion > 20400 ) // #i85462# prevent crashes
addFontSet( FcSetApplication );
}
#endif
diff --git a/vcl/unx/source/fontmanager/fontmanager.cxx b/vcl/unx/source/fontmanager/fontmanager.cxx
index a116749daf47..995abb5fb89f 100644
--- a/vcl/unx/source/fontmanager/fontmanager.cxx
+++ b/vcl/unx/source/fontmanager/fontmanager.cxx
@@ -2123,7 +2123,7 @@ void PrintFontManager::initialize()
const ::rtl::OUString &rSalPrivatePath = psp::getFontPath();
// search for the fonts in SAL_PRIVATE_FONTPATH first; those are
- // the TrueType fonts installed with the office
+ // the fonts installed with the office
if( rSalPrivatePath.getLength() )
{
OString aPath = rtl::OUStringToOString( rSalPrivatePath, aEncoding );