summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--unotools/source/config/configmgr.cxx2
-rw-r--r--unotools/source/config/makefile.mk3
-rw-r--r--vcl/source/control/tabctrl.cxx19
-rw-r--r--vcl/source/gdi/metaact.cxx6
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx8
-rw-r--r--vcl/unx/kde4/KDEXLib.cxx3
6 files changed, 33 insertions, 8 deletions
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx
index fdd141c2d004..5df150c9edb6 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -373,10 +373,12 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
Any aRet;
::rtl::OUString sBrandName;
+#ifdef ENABLE_BROFFICE
LanguageType nType = MsLangId::getSystemUILanguage();
if ( nType == LANGUAGE_PORTUGUESE_BRAZILIAN )
sBrandName = OUString(RTL_CONSTASCII_USTRINGPARAM("BrOffice"));
else
+#endif
sBrandName = BrandName::get();
if ( eProp == PRODUCTNAME && sBrandName.getLength() )
diff --git a/unotools/source/config/makefile.mk b/unotools/source/config/makefile.mk
index 27e8f67f8888..9a8e8d2d3d92 100644
--- a/unotools/source/config/makefile.mk
+++ b/unotools/source/config/makefile.mk
@@ -37,6 +37,9 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : settings.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
+.IF "$(ENABLE_BROFFICE)"=="TRUE"
+CDEFS+=-DENABLE_BROFFICE
+.ENDIF
# --- Files -------------------------------------
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 4d9b215ceb21..0e65740fbba2 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -456,15 +456,18 @@ Size TabControl::ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth )
Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight )
{
Size aWinSize = Control::GetOutputSizePixel();
- if ( nWidth == -1 )
+ if ( nWidth < 0 )
nWidth = aWinSize.Width();
- if ( nHeight == -1 )
+ if ( nHeight < 0 )
nHeight = aWinSize.Height();
if ( mpTabCtrlData->maItemList.empty() )
{
- return Rectangle( Point( TAB_OFFSET, TAB_OFFSET ),
- Size( nWidth-TAB_OFFSET*2, nHeight-TAB_OFFSET*2 ) );
+ long nW = nWidth-TAB_OFFSET*2;
+ long nH = nHeight-TAB_OFFSET*2;
+ return (nW > 0 && nH > 0)
+ ? Rectangle( Point( TAB_OFFSET, TAB_OFFSET ), Size( nW, nH ) )
+ : Rectangle();
}
if ( nItemPos == TAB_PAGERECT )
@@ -476,9 +479,11 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight
nLastPos = 0;
Rectangle aRect = ImplGetTabRect( nLastPos, nWidth, nHeight );
- aRect = Rectangle( Point( TAB_OFFSET, aRect.Bottom()+TAB_OFFSET ),
- Size( nWidth-TAB_OFFSET*2,
- nHeight-aRect.Bottom()-TAB_OFFSET*2 ) );
+ long nW = nWidth-TAB_OFFSET*2;
+ long nH = nHeight-aRect.Bottom()-TAB_OFFSET*2;
+ aRect = (nW > 0 && nH > 0)
+ ? Rectangle( Point( TAB_OFFSET, aRect.Bottom()+TAB_OFFSET ), Size( nW, nH ) )
+ : Rectangle();
return aRect;
}
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index f8ab4fc2ad54..6f9d1a85e510 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -1482,6 +1482,12 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
sal_Unicode* pBuffer = maStr.AllocBuffer( nLen );
while ( nLen-- )
rIStm >> *pBuffer++;
+
+ if ( mnIndex + mnLen > maStr.Len() )
+ {
+ mnIndex = 0;
+ delete[] mpDXAry, mpDXAry = NULL;
+ }
}
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index a6d349706b00..b740e71ea4a6 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -4629,6 +4629,7 @@ we check in the following sequence:
bSetRelative = true;
rtl::OUString aFragment = aTargetURL.GetMark( INetURLObject::NO_DECODE /*DECODE_WITH_CHARSET*/ ); //fragment as is,
+ bool bIsURI=false; //URI: 12.6.4.7, URI Actions, URI must be encoded in 7-bit-ASCII
if( nSetGoToRMode == 0 )
{
switch( m_aContext.DefaultLinkAction )
@@ -4637,6 +4638,7 @@ we check in the following sequence:
case PDFWriter::URIAction :
case PDFWriter::URIActionDestination :
aLine.append( "/URI/URI" );
+ bIsURI=true;
break;
case PDFWriter::LaunchAction:
// now:
@@ -4648,7 +4650,10 @@ we check in the following sequence:
// and will force the use of URI when the protocol is not file://
if( (aFragment.getLength() > 0 && !bTargetHasPDFExtension) ||
eTargetProtocol != INET_PROT_FILE )
+ {
aLine.append( "/URI/URI" );
+ bIsURI=true;
+ }
else
{
aLine.append( "/Launch/F" );
@@ -4659,7 +4664,8 @@ we check in the following sequence:
}
//fragment are encoded in the same way as in the named destination processing
if( nSetGoToRMode )
- {//add the fragment
+ {
+ //add the fragment
rtl::OUString aURLNoMark = aTargetURL.GetURLNoMark( INetURLObject::DECODE_WITH_CHARSET );
aLine.append("/GoToR");
aLine.append("/F");
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index cc168a2fe3be..3bfb02a109d7 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -168,6 +168,9 @@ void KDEXLib::Init()
KCmdLineArgs::init( m_nFakeCmdLineArgs, m_pAppCmdLineArgs, kAboutData );
+#if QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 )
+ QApplication::setGraphicsSystem( "native" ); // fdo#30991
+#endif
m_pApplication = new VCLKDEApplication();
kapp->disableSessionManagement();
KApplication::setQuitOnLastWindowClosed(false);