summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/imagerepository.hxx5
-rw-r--r--include/vcl/longcurr.hxx2
-rw-r--r--include/vcl/svapp.hxx2
-rw-r--r--svtools/source/graphic/provider.cxx2
-rw-r--r--vcl/opengl/x11/gdiimpl.cxx8
-rw-r--r--vcl/source/app/svapp.cxx6
-rw-r--r--vcl/source/control/field2.cxx13
-rw-r--r--vcl/source/control/longcurr.cxx49
-rw-r--r--vcl/source/filter/sgvspln.cxx20
-rw-r--r--vcl/source/filter/sgvtext.cxx6
-rw-r--r--vcl/source/fontsubset/ttcr.cxx230
-rw-r--r--vcl/source/gdi/dibtools.cxx23
-rw-r--r--vcl/source/gdi/graph.cxx17
-rw-r--r--vcl/source/gdi/svmconverter.cxx10
-rw-r--r--vcl/source/image/ImageRepository.cxx4
-rw-r--r--vcl/source/window/splitwin.cxx58
-rw-r--r--vcl/source/window/toolbox.cxx15
17 files changed, 176 insertions, 294 deletions
diff --git a/include/vcl/imagerepository.hxx b/include/vcl/imagerepository.hxx
index d7553802afe1..083a01667b9a 100644
--- a/include/vcl/imagerepository.hxx
+++ b/include/vcl/imagerepository.hxx
@@ -41,15 +41,12 @@ namespace vcl
the name of the image to load.
@param _out_rImage
will take the image upon successful return.
- @param bSearchLanguageDependent
- determines whether a language-dependent image is to be searched.
@return
whether or not the image could be loaded successfully.
*/
static bool loadImage(
const OUString& _rName,
- BitmapEx& _out_rImage,
- bool bSearchLanguageDependent
+ BitmapEx& _out_rImage
);
};
diff --git a/include/vcl/longcurr.hxx b/include/vcl/longcurr.hxx
index b7687ae32ce9..6e2aea73a052 100644
--- a/include/vcl/longcurr.hxx
+++ b/include/vcl/longcurr.hxx
@@ -83,7 +83,6 @@ private:
public:
LongCurrencyField( vcl::Window* pParent, WinBits nWinStyle );
- virtual bool PreNotify( NotifyEvent& rNEvt ) override;
virtual bool EventNotify( NotifyEvent& rNEvt ) override;
void Modify() override;
@@ -106,7 +105,6 @@ class VCL_DLLPUBLIC LongCurrencyBox : public ComboBox, public LongCurrencyFormat
public:
LongCurrencyBox( vcl::Window* pParent, WinBits nWinStyle );
- virtual bool PreNotify( NotifyEvent& rNEvt ) override;
virtual bool EventNotify( NotifyEvent& rNEvt ) override;
void Modify() override;
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 5624494414f8..e895dde09a7d 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -715,7 +715,7 @@ public:
@see ImplCallEventListeners(VclSimpleEvent* pEvent)
*/
- static void ImplCallEventListeners( VclEventId nEvent, vcl::Window* pWin, void* pData );
+ static void ImplCallEventListeners( VclEventId nEvent, void* pData );
/** Send event to all VCL application event listeners
diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx
index 8ac3a885d7ef..de7a2dff928c 100644
--- a/svtools/source/graphic/provider.cxx
+++ b/svtools/source/graphic/provider.cxx
@@ -177,7 +177,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadRepositoryImage(
{
OUString sPathName( rResourceURL.copy( nIndex ) );
BitmapEx aBitmap;
- if ( vcl::ImageRepository::loadImage( sPathName, aBitmap, false ) )
+ if ( vcl::ImageRepository::loadImage( sPathName, aBitmap ) )
{
xRet = Graphic(aBitmap).GetXGraphic();
}
diff --git a/vcl/opengl/x11/gdiimpl.cxx b/vcl/opengl/x11/gdiimpl.cxx
index dbf81f367552..dc9ad168e4e8 100644
--- a/vcl/opengl/x11/gdiimpl.cxx
+++ b/vcl/opengl/x11/gdiimpl.cxx
@@ -116,7 +116,7 @@ namespace
return 0;
}
- GLXFBConfig* getFBConfig(Display* dpy, Window win, int& nBestFBC, bool bUseDoubleBufferedRendering, bool bWithSameVisualID)
+ GLXFBConfig* getFBConfig(Display* dpy, Window win, int& nBestFBC, bool bUseDoubleBufferedRendering)
{
OpenGLZone aZone;
@@ -167,7 +167,7 @@ namespace
for(int i = 0; i < fbCount; ++i)
{
XVisualInfo* pVi = glXGetVisualFromFBConfig( dpy, pFBC[i] );
- if(pVi && (!bWithSameVisualID || (xattr.visual && pVi->visualid == xattr.visual->visualid)) )
+ if(pVi && (xattr.visual && pVi->visualid == xattr.visual->visualid) )
{
// pick the one with the most samples per pixel
int nSampleBuf = 0;
@@ -259,7 +259,7 @@ SystemWindowData X11OpenGLContext::generateWinData(vcl::Window* pParent, bool /*
return aWinData;
int best_fbc = -1;
- GLXFBConfig* pFBC = getFBConfig(dpy, win, best_fbc, true, false);
+ GLXFBConfig* pFBC = getFBConfig(dpy, win, best_fbc, true);
if (!pFBC)
return aWinData;
@@ -299,7 +299,7 @@ bool X11OpenGLContext::ImplInit()
if (glXCreateContextAttribsARB && !mbRequestLegacyContext)
{
int best_fbc = -1;
- GLXFBConfig* pFBC = getFBConfig(m_aGLWin.dpy, m_aGLWin.win, best_fbc, mbUseDoubleBufferedRendering, false);
+ GLXFBConfig* pFBC = getFBConfig(m_aGLWin.dpy, m_aGLWin.win, best_fbc, mbUseDoubleBufferedRendering);
if (pFBC && best_fbc != -1)
{
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 0bc16bedb090..21426cb190f8 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -657,7 +657,7 @@ void Application::SetSettings( const AllSettings& rSettings )
DataChangedEvent aDCEvt( DataChangedEventType::SETTINGS, &aOldSettings, nChangeFlags );
// notify data change handler
- ImplCallEventListeners( VclEventId::ApplicationDataChanged, nullptr, &aDCEvt);
+ ImplCallEventListeners( VclEventId::ApplicationDataChanged, &aDCEvt);
// Update all windows
vcl::Window* pFirstFrame = pSVData->maWinData.mpFirstFrame;
@@ -772,10 +772,10 @@ void Application::NotifyAllWindows( DataChangedEvent& rDCEvt )
}
}
-void Application::ImplCallEventListeners( VclEventId nEvent, vcl::Window *pWin, void* pData )
+void Application::ImplCallEventListeners( VclEventId nEvent, void* pData )
{
ImplSVData* pSVData = ImplGetSVData();
- VclWindowEvent aEvent( pWin, nEvent, pData );
+ VclWindowEvent aEvent( nullptr, nEvent, pData );
if ( pSVData->maAppData.mpEventListeners )
pSVData->maAppData.mpEventListeners->Call( aEvent );
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 3b3f4676c903..1c0268b09869 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -367,8 +367,9 @@ static void ImplPatternMaxPos( const OUString& rStr, const OString& rEditMask,
static void ImplPatternProcessStrictModify( Edit* pEdit,
const OString& rEditMask,
const OUString& rLiteralMask,
- sal_uInt16 nFormatFlags, bool bSameMask )
+ bool bSameMask )
{
+ sal_uInt16 nFormatFlags = 0;
OUString aText = pEdit->GetText();
// remove leading blanks
@@ -454,13 +455,13 @@ static bool ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
const OString& rEditMask,
const OUString& rLiteralMask,
bool bStrictFormat,
- sal_uInt16 nFormatFlags,
bool bSameMask,
bool& rbInKeyInput )
{
if ( rEditMask.isEmpty() || !bStrictFormat )
return false;
+ sal_uInt16 nFormatFlags = 0;
Selection aOldSel = pEdit->GetSelection();
vcl::KeyCode aCode = rKEvt.GetKeyCode();
sal_Unicode cChar = rKEvt.GetCharCode();
@@ -834,7 +835,7 @@ bool PatternField::PreNotify( NotifyEvent& rNEvt )
if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() )
{
if ( ImplPatternProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), GetEditMask(), GetLiteralMask(),
- IsStrictFormat(), 0/*nFormatFlags*/,
+ IsStrictFormat(),
ImplIsSameMask(), ImplGetInPattKeyInput() ) )
return true;
}
@@ -860,7 +861,7 @@ void PatternField::Modify()
if ( !ImplGetInPattKeyInput() )
{
if ( IsStrictFormat() )
- ImplPatternProcessStrictModify( GetField(), GetEditMask(), GetLiteralMask(), 0/*nFormatFlags*/, ImplIsSameMask() );
+ ImplPatternProcessStrictModify( GetField(), GetEditMask(), GetLiteralMask(), ImplIsSameMask() );
else
MarkToBeReformatted( true );
}
@@ -886,7 +887,7 @@ bool PatternBox::PreNotify( NotifyEvent& rNEvt )
if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() )
{
if ( ImplPatternProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), GetEditMask(), GetLiteralMask(),
- IsStrictFormat(), 0/*nFormatFlags*/,
+ IsStrictFormat(),
ImplIsSameMask(), ImplGetInPattKeyInput() ) )
return true;
}
@@ -912,7 +913,7 @@ void PatternBox::Modify()
if ( !ImplGetInPattKeyInput() )
{
if ( IsStrictFormat() )
- ImplPatternProcessStrictModify( GetField(), GetEditMask(), GetLiteralMask(), 0/*nFormatFlags*/, ImplIsSameMask() );
+ ImplPatternProcessStrictModify( GetField(), GetEditMask(), GetLiteralMask(), ImplIsSameMask() );
else
MarkToBeReformatted( true );
}
diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx
index 805da72f1eea..0b538747f1c9 100644
--- a/vcl/source/control/longcurr.cxx
+++ b/vcl/source/control/longcurr.cxx
@@ -92,28 +92,6 @@ OUString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const BigInt
return aTemplate.makeStringAndClear();
}
-bool ImplNumericProcessKeyInput( const KeyEvent& rKEvt,
- bool bStrictFormat, bool bThousandSep,
- const LocaleDataWrapper& rLocaleDataWrapper )
-{
- if ( !bStrictFormat )
- return false;
- else
- {
- sal_Unicode cChar = rKEvt.GetCharCode();
- sal_uInt16 nGroup = rKEvt.GetKeyCode().GetGroup();
-
- return !((nGroup == KEYGROUP_FKEYS) ||
- (nGroup == KEYGROUP_CURSOR) ||
- (nGroup == KEYGROUP_MISC) ||
- ((cChar >= '0') && (cChar <= '9')) ||
- (bThousandSep && string::equals(rLocaleDataWrapper.getNumThousandSep(), cChar)) ||
- (string::equals(rLocaleDataWrapper.getNumDecimalSep(), cChar) ) ||
- (string::equals(rLocaleDataWrapper.getNumDecimalSepAlt(), cChar) ) ||
- (cChar == '-'));
- }
-}
-
bool ImplNumericGetValue( const OUString& rStr, BigInt& rValue,
sal_uInt16 nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper,
bool bCurrency )
@@ -240,13 +218,6 @@ bool ImplNumericGetValue( const OUString& rStr, BigInt& rValue,
return true;
}
-bool ImplLongCurrencyProcessKeyInput( const KeyEvent& rKEvt,
- bool bUseThousandSep, const LocaleDataWrapper& rLocaleDataWrapper )
-{
- // There's no StrictFormat that makes sense here, thus allow all chars
- return ImplNumericProcessKeyInput( rKEvt, false, bUseThousandSep, rLocaleDataWrapper );
-}
-
} // namespace
inline bool ImplLongCurrencyGetValue( const OUString& rStr, BigInt& rValue,
@@ -447,16 +418,6 @@ LongCurrencyField::LongCurrencyField( vcl::Window* pParent, WinBits nWinStyle )
Reformat();
}
-bool LongCurrencyField::PreNotify( NotifyEvent& rNEvt )
-{
- if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
- {
- if ( ImplLongCurrencyProcessKeyInput( *rNEvt.GetKeyEvent(), IsUseThousandSep(), GetLocaleDataWrapper() ) )
- return true;
- }
- return SpinField::PreNotify( rNEvt );
-}
-
bool LongCurrencyField::EventNotify( NotifyEvent& rNEvt )
{
if( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS )
@@ -521,16 +482,6 @@ LongCurrencyBox::LongCurrencyBox( vcl::Window* pParent, WinBits nWinStyle ) :
Reformat();
}
-bool LongCurrencyBox::PreNotify( NotifyEvent& rNEvt )
-{
- if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
- {
- if ( ImplLongCurrencyProcessKeyInput( *rNEvt.GetKeyEvent(), IsUseThousandSep(), GetLocaleDataWrapper() ) )
- return true;
- }
- return ComboBox::PreNotify( rNEvt );
-}
-
bool LongCurrencyBox::EventNotify( NotifyEvent& rNEvt )
{
if( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS )
diff --git a/vcl/source/filter/sgvspln.cxx b/vcl/source/filter/sgvspln.cxx
index 43d3dc371849..6efc9ce9d02d 100644
--- a/vcl/source/filter/sgvspln.cxx
+++ b/vcl/source/filter/sgvspln.cxx
@@ -545,7 +545,7 @@ sal_uInt16 PeriodicSpline(sal_uInt16 n, const double* x, double* y,
sal_uInt16 ParaSpline(sal_uInt16 n, double* x, double* y, sal_uInt8 MargCond,
double Marg01, double Marg02,
double MargN1, double MargN2,
- bool CondT, double* T,
+ double* T,
double* bx, double* cx, double* dx,
double* by, double* cy, double* dy)
{
@@ -556,15 +556,13 @@ sal_uInt16 ParaSpline(sal_uInt16 n, double* x, double* y, sal_uInt8 MargCond,
if (n<2) return 1;
if ((MargCond & ~3) && (MargCond != 4)) return 2; // invalid boundary condition
- if (!CondT) {
- T[0]=0.0;
- for (i=0;i<n;i++) {
- double deltX,deltY,delt;
- deltX=x[i+1]-x[i]; deltY=y[i+1]-y[i];
- delt =deltX*deltX+deltY*deltY;
- if (delt<=0.0) return 3; // two identical adjacent points!
- T[i+1]=T[i]+sqrt(delt);
- }
+ T[0]=0.0;
+ for (i=0;i<n;i++) {
+ double deltX,deltY,delt;
+ deltX=x[i+1]-x[i]; deltY=y[i+1]-y[i];
+ delt =deltX*deltX+deltY*deltY;
+ if (delt<=0.0) return 3; // two identical adjacent points!
+ T[i+1]=T[i]+sqrt(delt);
}
switch (MargCond) {
case 0: break;
@@ -658,7 +656,7 @@ bool CalcSpline(tools::Polygon const & rPoly, bool Periodic, sal_uInt16& n,
bool bRet = false;
if ( ( Marg == 3 && n >= 3 ) || ( Marg == 2 && n >= 2 ) )
{
- bRet = ParaSpline(n,ax,ay,Marg,Marg01,Marg01,MargN1,MargN2,false,T,bx,cx,dx,by,cy,dy) == 0;
+ bRet = ParaSpline(n,ax,ay,Marg,Marg01,Marg01,MargN1,MargN2,T,bx,cx,dx,by,cy,dy) == 0;
}
if ( !bRet )
{
diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx
index e3ca71aa5663..9558f6fe1ebe 100644
--- a/vcl/source/filter/sgvtext.cxx
+++ b/vcl/source/filter/sgvtext.cxx
@@ -383,11 +383,11 @@ UCHAR GetTextChar(UCHAR* TBuf, sal_uInt16& Index,
UCHAR GetTextCharConv(UCHAR* TBuf, sal_uInt16& Index,
ObjTextType& Atr0, ObjTextType& AktAtr,
- sal_uInt16 Rest, bool ScanEsc)
+ sal_uInt16 Rest)
{
UCHAR c;
- c=GetTextChar(TBuf,Index,Atr0,AktAtr,Rest,ScanEsc);
+ c=GetTextChar(TBuf,Index,Atr0,AktAtr,Rest,false/*ScanEsc*/);
if (c<32) {
switch (c) {
case HardSpace : c=' '; break;
@@ -955,7 +955,7 @@ void TextType::Draw(OutputDevice& rOut, UCHAR* pBuffer)
T2=T1; Index2=Index1;
i=1;
while (i<=l) {
- c=GetTextCharConv(Buf,Index2,T,T2,l-i,false);
+ c=GetTextCharConv(Buf,Index2,T,T2,l-i);
long xp1,yp1; // due to overflow danger
PointType Pos;
xp1=long(Pos1.x)+xPos+long(xLine[i]);
diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx
index b90166a1b76e..e8c1b744054e 100644
--- a/vcl/source/fontsubset/ttcr.cxx
+++ b/vcl/source/fontsubset/ttcr.cxx
@@ -60,76 +60,44 @@ typedef struct {
} TableEntry;
/*- Data access macros for data stored in big-endian or little-endian format */
-static sal_Int16 GetInt16( const sal_uInt8* ptr, sal_uInt32 offset, int bigendian)
+static sal_Int16 GetInt16( const sal_uInt8* ptr, sal_uInt32 offset)
{
- sal_Int16 t;
assert(ptr != nullptr);
-
- if (bigendian) {
- t = (ptr+offset)[0] << 8 | (ptr+offset)[1];
- } else {
- t = (ptr+offset)[1] << 8 | (ptr+offset)[0];
- }
-
+ sal_Int16 t = (ptr+offset)[0] << 8 | (ptr+offset)[1];
return t;
}
-static sal_uInt16 GetUInt16( const sal_uInt8* ptr, sal_uInt32 offset, int bigendian)
+static sal_uInt16 GetUInt16( const sal_uInt8* ptr, sal_uInt32 offset)
{
- sal_uInt16 t;
assert(ptr != nullptr);
-
- if (bigendian) {
- t = (ptr+offset)[0] << 8 | (ptr+offset)[1];
- } else {
- t = (ptr+offset)[1] << 8 | (ptr+offset)[0];
- }
-
+ sal_uInt16 t = (ptr+offset)[0] << 8 | (ptr+offset)[1];
return t;
}
-static void PutInt16(sal_Int16 val, sal_uInt8 *ptr, sal_uInt32 offset, int bigendian)
+static void PutInt16(sal_Int16 val, sal_uInt8 *ptr, sal_uInt32 offset)
{
assert(ptr != nullptr);
- if (bigendian) {
- ptr[offset] = (sal_uInt8)((val >> 8) & 0xFF);
- ptr[offset+1] = (sal_uInt8)(val & 0xFF);
- } else {
- ptr[offset+1] = (sal_uInt8)((val >> 8) & 0xFF);
- ptr[offset] = (sal_uInt8)(val & 0xFF);
- }
+ ptr[offset] = (sal_uInt8)((val >> 8) & 0xFF);
+ ptr[offset+1] = (sal_uInt8)(val & 0xFF);
}
-static void PutUInt16(sal_uInt16 val, sal_uInt8 *ptr, sal_uInt32 offset, int bigendian)
+static void PutUInt16(sal_uInt16 val, sal_uInt8 *ptr, sal_uInt32 offset)
{
assert(ptr != nullptr);
- if (bigendian) {
- ptr[offset] = (sal_uInt8)((val >> 8) & 0xFF);
- ptr[offset+1] = (sal_uInt8)(val & 0xFF);
- } else {
- ptr[offset+1] = (sal_uInt8)((val >> 8) & 0xFF);
- ptr[offset] = (sal_uInt8)(val & 0xFF);
- }
+ ptr[offset] = (sal_uInt8)((val >> 8) & 0xFF);
+ ptr[offset+1] = (sal_uInt8)(val & 0xFF);
}
-static void PutUInt32(sal_uInt32 val, sal_uInt8 *ptr, sal_uInt32 offset, int bigendian)
+static void PutUInt32(sal_uInt32 val, sal_uInt8 *ptr, sal_uInt32 offset)
{
assert(ptr != nullptr);
- if (bigendian) {
- ptr[offset] = (sal_uInt8)((val >> 24) & 0xFF);
- ptr[offset+1] = (sal_uInt8)((val >> 16) & 0xFF);
- ptr[offset+2] = (sal_uInt8)((val >> 8) & 0xFF);
- ptr[offset+3] = (sal_uInt8)(val & 0xFF);
- } else {
- ptr[offset+3] = (sal_uInt8)((val >> 24) & 0xFF);
- ptr[offset+2] = (sal_uInt8)((val >> 16) & 0xFF);
- ptr[offset+1] = (sal_uInt8)((val >> 8) & 0xFF);
- ptr[offset] = (sal_uInt8)(val & 0xFF);
- }
-
+ ptr[offset] = (sal_uInt8)((val >> 24) & 0xFF);
+ ptr[offset+1] = (sal_uInt8)((val >> 16) & 0xFF);
+ ptr[offset+2] = (sal_uInt8)((val >> 8) & 0xFF);
+ ptr[offset+3] = (sal_uInt8)(val & 0xFF);
}
static int TableEntryCompareF(const void *l, const void *r)
@@ -273,18 +241,18 @@ int StreamToMemory(TrueTypeCreator *_this, sal_uInt8 **ptr, sal_uInt32 *length)
sal_uInt8* ttf = static_cast<sal_uInt8*>(smalloc(s));
/* Offset Table */
- PutUInt32(_this->tag, ttf, 0, 1);
- PutUInt16(numTables, ttf, 4, 1);
- PutUInt16(searchRange, ttf, 6, 1);
- PutUInt16(entrySelector, ttf, 8, 1);
- PutUInt16(rangeShift, ttf, 10, 1);
+ PutUInt32(_this->tag, ttf, 0);
+ PutUInt16(numTables, ttf, 4);
+ PutUInt16(searchRange, ttf, 6);
+ PutUInt16(entrySelector, ttf, 8);
+ PutUInt16(rangeShift, ttf, 10);
/* Table Directory */
for (int i = 0; i < numTables; ++i) {
- PutUInt32(te[i].tag, ttf + 12, 16 * i, 1);
- PutUInt32(CheckSum(reinterpret_cast<sal_uInt32 *>(te[i].data), te[i].length), ttf + 12, 16 * i + 4, 1);
- PutUInt32(offset, ttf + 12, 16 * i + 8, 1);
- PutUInt32(te[i].length, ttf + 12, 16 * i + 12, 1);
+ PutUInt32(te[i].tag, ttf + 12, 16 * i);
+ PutUInt32(CheckSum(reinterpret_cast<sal_uInt32 *>(te[i].data), te[i].length), ttf + 12, 16 * i + 4);
+ PutUInt32(offset, ttf + 12, 16 * i + 8);
+ PutUInt32(te[i].length, ttf + 12, 16 * i + 12);
if (te[i].tag == T_head) {
head = ttf + offset;
@@ -299,7 +267,7 @@ int StreamToMemory(TrueTypeCreator *_this, sal_uInt8 **ptr, sal_uInt32 *length)
p = reinterpret_cast<sal_uInt32 *>(ttf);
for (int i = 0; i < (int)s / 4; ++i) checkSumAdjustment += p[i];
- PutUInt32(0xB1B0AFBA - checkSumAdjustment, head, 8, 1);
+ PutUInt32(0xB1B0AFBA - checkSumAdjustment, head, 8);
*ptr = ttf;
*length = s;
@@ -630,9 +598,9 @@ static sal_uInt8 *PackCmapType0(CmapSubTable *s, sal_uInt32 *length)
sal_uInt32 i, j;
sal_uInt16 g;
- PutUInt16(0, ptr, 0, 1);
- PutUInt16(262, ptr, 2, 1);
- PutUInt16(0, ptr, 4, 1);
+ PutUInt16(0, ptr, 0);
+ PutUInt16(262, ptr, 2);
+ PutUInt16(0, ptr, 4);
for (i = 0; i < 256; i++) {
g = 0;
@@ -654,11 +622,11 @@ static sal_uInt8 *PackCmapType6(CmapSubTable *s, sal_uInt32 *length)
sal_uInt32 i, j;
sal_uInt16 g;
- PutUInt16(6, ptr, 0, 1);
- PutUInt16((sal_uInt16)(s->n*2+10), ptr, 2, 1);
- PutUInt16(0, ptr, 4, 1);
- PutUInt16(0, ptr, 6, 1);
- PutUInt16((sal_uInt16)(s->n), ptr, 8, 1 );
+ PutUInt16(6, ptr, 0);
+ PutUInt16((sal_uInt16)(s->n*2+10), ptr, 2);
+ PutUInt16(0, ptr, 4);
+ PutUInt16(0, ptr, 6);
+ PutUInt16((sal_uInt16)(s->n), ptr, 8 );
for (i = 0; i < s->n; i++) {
g = 0;
@@ -667,7 +635,7 @@ static sal_uInt8 *PackCmapType6(CmapSubTable *s, sal_uInt32 *length)
g = (sal_uInt16) s->xg[j];
}
}
- PutUInt16( g, p, 2*i, 1 );
+ PutUInt16( g, p, 2*i );
}
*length = s->n*2+10;
return ptr;
@@ -709,14 +677,14 @@ static int GetRawData_cmap(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
cmapsize = tlen + 4 + 8 * t->n;
_this->rawdata = cmap = ttmalloc(cmapsize);
- PutUInt16(0, cmap, 0, 1);
- PutUInt16((sal_uInt16)t->n, cmap, 2, 1);
+ PutUInt16(0, cmap, 0);
+ PutUInt16((sal_uInt16)t->n, cmap, 2);
coffset = 4 + t->n * 8;
for (i = 0; i < t->n; i++) {
- PutUInt16((sal_uInt16)(t->s[i].id >> 16), cmap + 4, i * 8, 1);
- PutUInt16((sal_uInt16)(t->s[i].id & 0xFF), cmap + 4, 2 + i * 8, 1);
- PutUInt32(coffset, cmap + 4, 4 + i * 8, 1);
+ PutUInt16((sal_uInt16)(t->s[i].id >> 16), cmap + 4, i * 8);
+ PutUInt16((sal_uInt16)(t->s[i].id & 0xFF), cmap + 4, 2 + i * 8);
+ PutUInt32(coffset, cmap + 4, 4 + i * 8);
memcpy(cmap + coffset, subtables[i], sizes[i]);
free(subtables[i]);
coffset += sizes[i];
@@ -769,20 +737,20 @@ static int GetRawData_name(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
int nameLen = stringLen + 12 * n + 6;
sal_uInt8* name = ttmalloc(nameLen);
- PutUInt16(0, name, 0, 1);
- PutUInt16(n, name, 2, 1);
- PutUInt16((sal_uInt16)(6 + 12 * n), name, 4, 1);
+ PutUInt16(0, name, 0);
+ PutUInt16(n, name, 2);
+ PutUInt16((sal_uInt16)(6 + 12 * n), name, 4);
p1 = name + 6;
p2 = p1 + 12 * n;
for (i = 0; i < n; i++) {
- PutUInt16(nr[i].platformID, p1, 0, 1);
- PutUInt16(nr[i].encodingID, p1, 2, 1);
- PutUInt16((sal_uInt16)nr[i].languageID, p1, 4, 1);
- PutUInt16(nr[i].nameID, p1, 6, 1);
- PutUInt16(nr[i].slen, p1, 8, 1);
- PutUInt16((sal_uInt16)(p2 - (name + 6 + 12 * n)), p1, 10, 1);
+ PutUInt16(nr[i].platformID, p1, 0);
+ PutUInt16(nr[i].encodingID, p1, 2);
+ PutUInt16((sal_uInt16)nr[i].languageID, p1, 4);
+ PutUInt16(nr[i].nameID, p1, 6);
+ PutUInt16(nr[i].slen, p1, 8);
+ PutUInt16((sal_uInt16)(p2 - (name + 6 + 12 * n)), p1, 10);
if (nr[i].slen) {
memcpy(p2, nr[i].sptr, nr[i].slen);
}
@@ -815,11 +783,11 @@ static int GetRawData_post(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
if (p->format == 0x00030000) {
postLen = 32;
post = ttmalloc(postLen);
- PutUInt32(0x00030000, post, 0, 1);
- PutUInt32(p->italicAngle, post, 4, 1);
- PutUInt16(p->underlinePosition, post, 8, 1);
- PutUInt16(p->underlineThickness, post, 10, 1);
- PutUInt16((sal_uInt16)p->isFixedPitch, post, 12, 1);
+ PutUInt32(0x00030000, post, 0);
+ PutUInt32(p->italicAngle, post, 4);
+ PutUInt16(p->underlinePosition, post, 8);
+ PutUInt16(p->underlineThickness, post, 10);
+ PutUInt16((sal_uInt16)p->isFixedPitch, post, 12);
ret = TTCR_OK;
} else {
fprintf(stderr, "Unrecognized format of a post table: %08X.\n", (int)p->format);
@@ -900,17 +868,17 @@ TrueTypeTable *TrueTypeTableNew_head(sal_uInt32 fontRevision,
TrueTypeTable* table = static_cast<TrueTypeTable*>(smalloc(sizeof(TrueTypeTable)));
sal_uInt8* ptr = ttmalloc(TABLESIZE_head);
- PutUInt32(0x00010000, ptr, 0, 1); /* version */
- PutUInt32(fontRevision, ptr, 4, 1);
- PutUInt32(0x5F0F3CF5, ptr, 12, 1); /* magic number */
- PutUInt16(flags, ptr, 16, 1);
- PutUInt16(unitsPerEm, ptr, 18, 1);
+ PutUInt32(0x00010000, ptr, 0); /* version */
+ PutUInt32(fontRevision, ptr, 4);
+ PutUInt32(0x5F0F3CF5, ptr, 12); /* magic number */
+ PutUInt16(flags, ptr, 16);
+ PutUInt16(unitsPerEm, ptr, 18);
memcpy(ptr+20, created, 8); /* Created Long Date */
memset(ptr+28, 0, 8); /* Modified Long Date */
- PutUInt16(macStyle, ptr, 44, 1);
- PutUInt16(lowestRecPPEM, ptr, 46, 1);
- PutUInt16(fontDirectionHint, ptr, 48, 1);
- PutUInt16(0, ptr, 52, 1); /* glyph data format: 0 */
+ PutUInt16(macStyle, ptr, 44);
+ PutUInt16(lowestRecPPEM, ptr, 46);
+ PutUInt16(fontDirectionHint, ptr, 48);
+ PutUInt16(0, ptr, 52); /* glyph data format: 0 */
table->data = static_cast<void *>(ptr);
table->tag = T_head;
@@ -928,18 +896,18 @@ TrueTypeTable *TrueTypeTableNew_hhea(sal_Int16 ascender,
TrueTypeTable* table = static_cast<TrueTypeTable*>(smalloc(sizeof(TrueTypeTable)));
sal_uInt8* ptr = ttmalloc(TABLESIZE_hhea);
- PutUInt32(0x00010000, ptr, 0, 1); /* version */
- PutUInt16(ascender, ptr, 4, 1);
- PutUInt16(descender, ptr, 6, 1);
- PutUInt16(linegap, ptr, 8, 1);
- PutUInt16(caretSlopeRise, ptr, 18, 1);
- PutUInt16(caretSlopeRun, ptr, 20, 1);
- PutUInt16(0, ptr, 22, 1); /* reserved 1 */
- PutUInt16(0, ptr, 24, 1); /* reserved 2 */
- PutUInt16(0, ptr, 26, 1); /* reserved 3 */
- PutUInt16(0, ptr, 28, 1); /* reserved 4 */
- PutUInt16(0, ptr, 30, 1); /* reserved 5 */
- PutUInt16(0, ptr, 32, 1); /* metricDataFormat */
+ PutUInt32(0x00010000, ptr, 0); /* version */
+ PutUInt16(ascender, ptr, 4);
+ PutUInt16(descender, ptr, 6);
+ PutUInt16(linegap, ptr, 8);
+ PutUInt16(caretSlopeRise, ptr, 18);
+ PutUInt16(caretSlopeRun, ptr, 20);
+ PutUInt16(0, ptr, 22); /* reserved 1 */
+ PutUInt16(0, ptr, 24); /* reserved 2 */
+ PutUInt16(0, ptr, 26); /* reserved 3 */
+ PutUInt16(0, ptr, 28); /* reserved 4 */
+ PutUInt16(0, ptr, 30); /* reserved 5 */
+ PutUInt16(0, ptr, 32); /* metricDataFormat */
table->data = static_cast<void *>(ptr);
table->tag = T_hhea;
@@ -1304,16 +1272,16 @@ static void ProcessTables(TrueTypeCreator *tt)
/* printf("IDs: %d %d.\n", gd->glyphID, gd->newID); */
if (gd->nbytes != 0) {
- z = GetInt16(gd->ptr, 2, 1);
+ z = GetInt16(gd->ptr, 2);
if (z < xMin) xMin = z;
- z = GetInt16(gd->ptr, 4, 1);
+ z = GetInt16(gd->ptr, 4);
if (z < yMin) yMin = z;
- z = GetInt16(gd->ptr, 6, 1);
+ z = GetInt16(gd->ptr, 6);
if (z > xMax) xMax = z;
- z = GetInt16(gd->ptr, 8, 1);
+ z = GetInt16(gd->ptr, 8);
if (z > yMax) yMax = z;
}
@@ -1346,8 +1314,8 @@ static void ProcessTables(TrueTypeCreator *tt)
sal_uInt8 *ptr = gd->ptr + 10;
do {
sal_uInt32 j;
- flags = GetUInt16(ptr, 0, 1);
- index = GetUInt16(ptr, 2, 1);
+ flags = GetUInt16(ptr, 0);
+ index = GetUInt16(ptr, 2);
/* XXX use the sorted array of old to new glyphID mapping and do a binary search */
for (j = 0; j < nGlyphs; j++) {
if (gid[j] == index) {
@@ -1356,7 +1324,7 @@ static void ProcessTables(TrueTypeCreator *tt)
}
/* printf("X: %d -> %d.\n", index, j); */
- PutUInt16((sal_uInt16) j, ptr, 2, 1);
+ PutUInt16((sal_uInt16) j, ptr, 2);
ptr += 4;
@@ -1380,10 +1348,10 @@ static void ProcessTables(TrueTypeCreator *tt)
memcpy(p1, gd->ptr, gd->nbytes);
}
if (indexToLocFormat == 1) {
- PutUInt32(p1 - glyfPtr, p2, 0, 1);
+ PutUInt32(p1 - glyfPtr, p2, 0);
p2 += 4;
} else {
- PutUInt16((sal_uInt16)((p1 - glyfPtr) >> 1), p2, 0, 1);
+ PutUInt16((sal_uInt16)((p1 - glyfPtr) >> 1), p2, 0);
p2 += 2;
}
p1 += gd->nbytes;
@@ -1397,9 +1365,9 @@ static void ProcessTables(TrueTypeCreator *tt)
free(gid);
if (indexToLocFormat == 1) {
- PutUInt32(p1 - glyfPtr, p2, 0, 1);
+ PutUInt32(p1 - glyfPtr, p2, 0);
} else {
- PutUInt16((sal_uInt16)((p1 - glyfPtr) >> 1), p2, 0, 1);
+ PutUInt16((sal_uInt16)((p1 - glyfPtr) >> 1), p2, 0);
}
glyf->rawdata = glyfPtr;
@@ -1412,20 +1380,20 @@ static void ProcessTables(TrueTypeCreator *tt)
head = FindTable(tt, T_head);
sal_uInt8* const pHeadData = static_cast<sal_uInt8*>(head->data);
- PutInt16(xMin, pHeadData, 36, 1);
- PutInt16(yMin, pHeadData, 38, 1);
- PutInt16(xMax, pHeadData, 40, 1);
- PutInt16(yMax, pHeadData, 42, 1);
- PutInt16(indexToLocFormat, pHeadData, 50, 1);
+ PutInt16(xMin, pHeadData, 36);
+ PutInt16(yMin, pHeadData, 38);
+ PutInt16(xMax, pHeadData, 40);
+ PutInt16(yMax, pHeadData, 42);
+ PutInt16(indexToLocFormat, pHeadData, 50);
maxp = FindTable(tt, T_maxp);
sal_uInt8* const pMaxpData = static_cast<sal_uInt8*>(maxp->data);
- PutUInt16((sal_uInt16)nGlyphs, pMaxpData, 4, 1);
- PutUInt16(maxPoints, pMaxpData, 6, 1);
- PutUInt16(maxContours, pMaxpData, 8, 1);
- PutUInt16(maxCompositePoints, pMaxpData, 10, 1);
- PutUInt16(maxCompositeContours, pMaxpData, 12, 1);
+ PutUInt16((sal_uInt16)nGlyphs, pMaxpData, 4);
+ PutUInt16(maxPoints, pMaxpData, 6);
+ PutUInt16(maxContours, pMaxpData, 8);
+ PutUInt16(maxCompositePoints, pMaxpData, 10);
+ PutUInt16(maxCompositeContours, pMaxpData, 12);
/*
* Generate an htmx table and update hhea table
@@ -1444,17 +1412,17 @@ static void ProcessTables(TrueTypeCreator *tt)
for (i = 0; i < nGlyphs; i++) {
if (i < nGlyphs - nlsb) {
- PutUInt16(met[i].adv, p1, 0, 1);
- PutUInt16(met[i].sb, p1, 2, 1);
+ PutUInt16(met[i].adv, p1, 0);
+ PutUInt16(met[i].sb, p1, 2);
p1 += 4;
} else {
- PutUInt16(met[i].sb, p1, 0, 1);
+ PutUInt16(met[i].sb, p1, 0);
p1 += 2;
}
}
AddTable(tt, TrueTypeTableNew(T_hmtx, hmtxSize, hmtxPtr));
- PutUInt16((sal_uInt16)(nGlyphs - nlsb), hheaPtr, 34, 1);
+ PutUInt16((sal_uInt16)(nGlyphs - nlsb), hheaPtr, 34);
free(hmtxPtr);
free(met);
}
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index 8e20fd7a9aa3..6a5aa9f4dc30 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -1652,7 +1652,6 @@ bool ImplReadDIB(
bool ImplWriteDIB(
const Bitmap& rSource,
- const Bitmap* pSourceAlpha,
SvStream& rOStm,
bool bCompressed,
bool bFileHeader)
@@ -1667,27 +1666,13 @@ bool ImplWriteDIB(
const SvStreamEndian nOldFormat(rOStm.GetEndian());
const sal_uLong nOldPos(rOStm.Tell());
- if(pSourceAlpha)
- {
- const Size aSizePixAlpha(pSourceAlpha->GetSizePixel());
-
- if(aSizePixAlpha == aSizePix)
- {
- pAccAlpha = Bitmap::ScopedReadAccess(const_cast< Bitmap& >(*pSourceAlpha));
- }
- else
- {
- OSL_ENSURE(false, "WriteDIB got an alpha channel, but it's pixel size differs from the base bitmap (!)");
- }
- }
-
rOStm.SetEndian(SvStreamEndian::LITTLE);
if (pAcc)
{
if(bFileHeader)
{
- if(ImplWriteDIBFileHeader(rOStm, *pAcc, nullptr != pSourceAlpha))
+ if(ImplWriteDIBFileHeader(rOStm, *pAcc, false))
{
bRet = ImplWriteDIBBody(rSource, rOStm, *pAcc, pAccAlpha.get(), bCompressed);
}
@@ -1825,14 +1810,14 @@ bool WriteDIB(
bool bCompressed,
bool bFileHeader)
{
- return ImplWriteDIB(rSource, nullptr, rOStm, bCompressed, bFileHeader);
+ return ImplWriteDIB(rSource, rOStm, bCompressed, bFileHeader);
}
bool WriteDIBBitmapEx(
const BitmapEx& rSource,
SvStream& rOStm)
{
- if(ImplWriteDIB(rSource.GetBitmap(), nullptr, rOStm, true, true))
+ if(ImplWriteDIB(rSource.GetBitmap(), rOStm, true, true))
{
rOStm.WriteUInt32( 0x25091962 );
rOStm.WriteUInt32( 0xACB20201 );
@@ -1840,7 +1825,7 @@ bool WriteDIBBitmapEx(
if(TransparentType::Bitmap == rSource.eTransparent)
{
- return ImplWriteDIB(rSource.aMask, nullptr, rOStm, true, true);
+ return ImplWriteDIB(rSource.aMask, rOStm, true, true);
}
else if(TransparentType::Color == rSource.eTransparent)
{
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index d60a4f2cf0a2..9b2d89489cdd 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -38,14 +38,14 @@ namespace
{
void ImplDrawDefault( OutputDevice* pOutDev, const OUString* pText,
- vcl::Font* pFont, const Bitmap* pBitmap, const BitmapEx* pBitmapEx,
+ vcl::Font* pFont, const BitmapEx* pBitmapEx,
const Point& rDestPt, const Size& rDestSize )
{
sal_uInt16 nPixel = (sal_uInt16) pOutDev->PixelToLogic( Size( 1, 1 ) ).Width();
sal_uInt16 nPixelWidth = nPixel;
Point aPoint( rDestPt.X() + nPixelWidth, rDestPt.Y() + nPixelWidth );
Size aSize( rDestSize.Width() - ( nPixelWidth << 1 ), rDestSize.Height() - ( nPixelWidth << 1 ) );
- bool bFilled = ( pBitmap != nullptr || pBitmapEx != nullptr || pFont != nullptr );
+ bool bFilled = ( pBitmapEx != nullptr || pFont != nullptr );
tools::Rectangle aBorderRect( aPoint, aSize );
pOutDev->Push();
@@ -78,16 +78,13 @@ void ImplDrawDefault( OutputDevice* pOutDev, const OUString* pText,
aSize.Height() -= 2*nPixelWidth + 4*nPixel;
if( aSize.Width() > 0 && aSize.Height() > 0
- && ( ( pBitmap && !!*pBitmap ) || ( pBitmapEx && !!*pBitmapEx ) ) )
+ && ( pBitmapEx && !!*pBitmapEx ) )
{
- Size aBitmapSize( pOutDev->PixelToLogic( pBitmap ? pBitmap->GetSizePixel() : pBitmapEx->GetSizePixel() ) );
+ Size aBitmapSize( pOutDev->PixelToLogic( pBitmapEx->GetSizePixel() ) );
if( aSize.Height() > aBitmapSize.Height() && aSize.Width() > aBitmapSize.Width() )
{
- if ( pBitmap )
- pOutDev->DrawBitmap( aPoint, *pBitmap );
- else
- pOutDev->DrawBitmapEx( aPoint, *pBitmapEx );
+ pOutDev->DrawBitmapEx( aPoint, *pBitmapEx );
aPoint.X() += aBitmapSize.Width() + 2*nPixel;
aSize.Width() -= aBitmapSize.Width() + 2*nPixel;
}
@@ -451,7 +448,7 @@ void Graphic::Draw( OutputDevice* pOutDev,
const Point& rDestPt, const Size& rDestSz ) const
{
if( GraphicType::Default == mxImpGraphic->ImplGetType() )
- ImplDrawDefault( pOutDev, nullptr, nullptr, nullptr, nullptr, rDestPt, rDestSz );
+ ImplDrawDefault( pOutDev, nullptr, nullptr, nullptr, rDestPt, rDestSz );
else
mxImpGraphic->ImplDraw( pOutDev, rDestPt, rDestSz );
}
@@ -460,7 +457,7 @@ void Graphic::DrawEx( OutputDevice* pOutDev, const OUString& rText,
vcl::Font& rFont, const BitmapEx& rBitmap,
const Point& rDestPt, const Size& rDestSz )
{
- ImplDrawDefault( pOutDev, &rText, &rFont, nullptr, &rBitmap, rDestPt, rDestSz );
+ ImplDrawDefault( pOutDev, &rText, &rFont, &rBitmap, rDestPt, rDestSz );
}
void Graphic::StartAnimation( OutputDevice* pOutDev, const Point& rDestPt,
diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx
index 8aa3e8539267..2f37550c7e22 100644
--- a/vcl/source/gdi/svmconverter.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -344,7 +344,7 @@ void ImplSkipActions(SvStream& rIStm, sal_uLong nSkipCount)
}
}
-bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const tools::PolyPolygon& rPolyPolygon, bool bOnlyWhenCurve)
+bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const tools::PolyPolygon& rPolyPolygon)
{
const sal_uInt16 nPolygonCount(rPolyPolygon.Count());
@@ -372,7 +372,7 @@ bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const tools::PolyPolygo
}
}
- if((bOnlyWhenCurve && nAllFlagCount) || (!bOnlyWhenCurve && nAllPointCount))
+ if(nAllFlagCount)
{
rOStm.WriteInt16( GDI_EXTENDEDPOLYGON_ACTION );
@@ -1770,7 +1770,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile const & r
nCount++;
const tools::PolyPolygon aPolyPolygon(pAct->GetPolygon());
- if(ImplWriteExtendedPolyPolygonAction(rOStm, aPolyPolygon, true))
+ if(ImplWriteExtendedPolyPolygonAction(rOStm, aPolyPolygon))
{
nCount++;
}
@@ -1818,7 +1818,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile const & r
nCount++;
const tools::PolyPolygon aPolyPolygon(pAct->GetPolygon());
- if(ImplWriteExtendedPolyPolygonAction(rOStm, aPolyPolygon, true))
+ if(ImplWriteExtendedPolyPolygonAction(rOStm, aPolyPolygon))
{
nCount++;
}
@@ -1831,7 +1831,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile const & r
ImplWritePolyPolyAction( rOStm, pAct->GetPolyPolygon() );
nCount++;
- if(ImplWriteExtendedPolyPolygonAction(rOStm, pAct->GetPolyPolygon(), true))
+ if(ImplWriteExtendedPolyPolygonAction(rOStm, pAct->GetPolyPolygon()))
{
nCount++;
}
diff --git a/vcl/source/image/ImageRepository.cxx b/vcl/source/image/ImageRepository.cxx
index 5e14a70fdb47..59b9563549e9 100644
--- a/vcl/source/image/ImageRepository.cxx
+++ b/vcl/source/image/ImageRepository.cxx
@@ -25,11 +25,11 @@
namespace vcl
{
- bool ImageRepository::loadImage( const OUString& _rName, BitmapEx& _out_rImage, bool _bSearchLanguageDependent )
+ bool ImageRepository::loadImage( const OUString& _rName, BitmapEx& _out_rImage )
{
OUString sIconTheme = Application::GetSettings().GetStyleSettings().DetermineIconTheme();
- return ImageTree::get().loadImage( _rName, sIconTheme, _out_rImage, _bSearchLanguageDependent );
+ return ImageTree::get().loadImage( _rName, sIconTheme, _out_rImage, false/*_bSearchLanguageDependent*/ );
}
} // namespace vcl
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 4d2a5e4142b6..1f05f3fc5be6 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -175,46 +175,36 @@ namespace {
}
}
-static void ImplCalcBorder( WindowAlign eAlign, bool bNoAlign,
+static void ImplCalcBorder( WindowAlign eAlign,
long& rLeft, long& rTop,
long& rRight, long& rBottom )
{
- if ( bNoAlign )
+ switch ( eAlign )
{
+ case WindowAlign::Top:
rLeft = 2;
rTop = 2;
rRight = 2;
+ rBottom = 0;
+ break;
+ case WindowAlign::Left:
+ rLeft = 0;
+ rTop = 2;
+ rRight = 2;
rBottom = 2;
- }
- else
- {
- switch ( eAlign )
- {
- case WindowAlign::Top:
- rLeft = 2;
- rTop = 2;
- rRight = 2;
- rBottom = 0;
- break;
- case WindowAlign::Left:
- rLeft = 0;
- rTop = 2;
- rRight = 2;
- rBottom = 2;
- break;
- case WindowAlign::Bottom:
- rLeft = 2;
- rTop = 0;
- rRight = 2;
- rBottom = 2;
- break;
- default:
- rLeft = 0;
- rTop = 2;
- rRight = 2;
- rBottom = 2;
- break;
- }
+ break;
+ case WindowAlign::Bottom:
+ rLeft = 2;
+ rTop = 0;
+ rRight = 2;
+ rBottom = 2;
+ break;
+ default:
+ rLeft = 0;
+ rTop = 2;
+ rRight = 2;
+ rBottom = 2;
+ break;
}
}
@@ -1296,7 +1286,7 @@ void SplitWindow::ImplInit( vcl::Window* pParent, WinBits nStyle )
if ( nStyle & WB_BORDER )
{
- ImplCalcBorder( meAlign, false/*bNoAlign*/, mnLeftBorder, mnTopBorder,
+ ImplCalcBorder( meAlign, mnLeftBorder, mnTopBorder,
mnRightBorder, mnBottomBorder );
}
else
@@ -2905,7 +2895,7 @@ void SplitWindow::ImplNewAlign()
if ( mnWinStyle & WB_BORDER )
{
- ImplCalcBorder( meAlign, false/*bNoAlign*/, mnLeftBorder, mnTopBorder,
+ ImplCalcBorder( meAlign, mnLeftBorder, mnTopBorder,
mnRightBorder, mnBottomBorder );
}
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 45099edbefe0..fa0129bdba53 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -2443,18 +2443,15 @@ IMPL_LINK_NOARG(ToolBox, ImplUpdateHdl, Timer *, void)
ImplFormat();
}
-static void ImplDrawMoreIndicator(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, bool bSetColor, bool bRotate )
+static void ImplDrawMoreIndicator(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, bool bRotate )
{
rRenderContext.Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR);
rRenderContext.SetLineColor();
- if (bSetColor)
- {
- if (rRenderContext.GetSettings().GetStyleSettings().GetFaceColor().IsDark())
- rRenderContext.SetFillColor(Color(COL_WHITE));
- else
- rRenderContext.SetFillColor(Color(COL_BLACK));
- }
+ if (rRenderContext.GetSettings().GetStyleSettings().GetFaceColor().IsDark())
+ rRenderContext.SetFillColor(Color(COL_WHITE));
+ else
+ rRenderContext.SetFillColor(Color(COL_BLACK));
float fScaleFactor = rRenderContext.GetDPIScaleFactor();
int linewidth = 1 * fScaleFactor;
@@ -2593,7 +2590,7 @@ void ToolBox::ImplDrawMenuButton(vcl::RenderContext& rRenderContext, bool bHighl
ImplDrawButton(rRenderContext, mpData->maMenubuttonItem.maRect, 2, false, true, false );
if (ImplHasClippedItems())
- ImplDrawMoreIndicator(rRenderContext, mpData->maMenubuttonItem.maRect, true, !mbHorz);
+ ImplDrawMoreIndicator(rRenderContext, mpData->maMenubuttonItem.maRect, !mbHorz);
// store highlight state
mpData->mbMenubuttonSelected = bHighlight;