Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
90067e80
Kaydet (Commit)
90067e80
authored
Eki 26, 2011
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
gtk3: cleanup some code inclusion, and share timeval operators
üst
306c79e2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
175 additions
and
136 deletions
+175
-136
Library_vclplug_svp.mk
vcl/Library_vclplug_svp.mk
+1
-0
svpdata.cxx
vcl/headless/svpdata.cxx
+50
-0
svpinst.cxx
vcl/headless/svpinst.cxx
+2
-50
svpinst.hxx
vcl/inc/headless/svpinst.hxx
+1
-1
salunx.h
vcl/inc/unx/salunx.h
+1
-84
salunxtime.h
vcl/inc/unx/salunxtime.h
+120
-0
gtkinst.cxx
vcl/unx/gtk/app/gtkinst.cxx
+0
-1
No files found.
vcl/Library_vclplug_svp.mk
Dosyayı görüntüle @
90067e80
...
@@ -80,6 +80,7 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_svp,\
...
@@ -80,6 +80,7 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_svp,\
vcl/headless/svpframe \
vcl/headless/svpframe \
vcl/headless/svpgdi \
vcl/headless/svpgdi \
vcl/headless/svpinst \
vcl/headless/svpinst \
vcl/headless/svpdata \
vcl/headless/svpprn \
vcl/headless/svpprn \
vcl/headless/svppspgraphics \
vcl/headless/svppspgraphics \
vcl/headless/svptext \
vcl/headless/svptext \
...
...
vcl/headless/svpdata.cxx
0 → 100644
Dosyayı görüntüle @
90067e80
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* Version: MPL 1.1 / GPLv3+ / LGPLv3+
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License or as specified alternatively below. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Major Contributor(s):
* Copyright (C) 2011 Novell, Inc.
*
* All Rights Reserved.
*
* For minor contributions see the git repository.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 3 or later (the "GPLv3+"), or
* the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
* in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
* instead of those above.
*/
#include <generic/gendata.hxx>
#include <headless/svpinst.hxx>
class
SvpSalData
:
public
SalGenericData
{
public
:
SvpSalData
(
SalInstance
*
pInstance
)
:
SalGenericData
(
SAL_DATA_SVP
,
pInstance
)
{}
virtual
void
ErrorTrapPush
()
{}
virtual
bool
ErrorTrapPop
(
bool
)
{
return
false
;
}
};
// plugin factory function
extern
"C"
{
SAL_DLLPUBLIC_EXPORT
SalInstance
*
create_SalInstance
()
{
SvpSalInstance
*
pInstance
=
new
SvpSalInstance
(
new
SalYieldMutex
()
);
new
SvpSalData
(
pInstance
);
return
pInstance
;
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/headless/svpinst.cxx
Dosyayı görüntüle @
90067e80
...
@@ -45,28 +45,8 @@
...
@@ -45,28 +45,8 @@
#include <svdata.hxx>
#include <svdata.hxx>
#include <generic/gendata.hxx>
#include <generic/gendata.hxx>
#include <vcl/solarmutex.hxx>
#include <vcl/solarmutex.hxx>
// FIXME: remove when we re-work the svp mainloop
// FIXME: split off into a separate, standalone module to aid linking
#include <unx/salunxtime.h>
#ifndef GTK3_INCLUDED
class
SvpSalData
:
public
SalGenericData
{
public
:
SvpSalData
(
SalInstance
*
pInstance
)
:
SalGenericData
(
SAL_DATA_SVP
,
pInstance
)
{
}
virtual
void
ErrorTrapPush
()
{}
virtual
bool
ErrorTrapPop
(
bool
)
{
return
false
;
}
};
// plugin factory function
extern
"C"
{
SAL_DLLPUBLIC_EXPORT
SalInstance
*
create_SalInstance
()
{
SvpSalInstance
*
pInstance
=
new
SvpSalInstance
(
new
SalYieldMutex
()
);
new
SvpSalData
(
pInstance
);
return
pInstance
;
}
}
#endif
bool
SvpSalInstance
::
isFrameAlive
(
const
SalFrame
*
pFrame
)
const
bool
SvpSalInstance
::
isFrameAlive
(
const
SalFrame
*
pFrame
)
const
{
{
...
@@ -198,34 +178,6 @@ void SvpSalInstance::Wakeup()
...
@@ -198,34 +178,6 @@ void SvpSalInstance::Wakeup()
OSL_VERIFY
(
write
(
m_pTimeoutFDS
[
1
],
""
,
1
)
==
1
);
OSL_VERIFY
(
write
(
m_pTimeoutFDS
[
1
],
""
,
1
)
==
1
);
}
}
// FIXME: share this with unx/generic [!] ....
#ifndef GTK3_INCLUDED
// -=-= timeval =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
inline
int
operator
>=
(
const
timeval
&
t1
,
const
timeval
&
t2
)
{
if
(
t1
.
tv_sec
==
t2
.
tv_sec
)
return
t1
.
tv_usec
>=
t2
.
tv_usec
;
return
t1
.
tv_sec
>
t2
.
tv_sec
;
}
inline
timeval
&
operator
+=
(
timeval
&
t1
,
sal_uLong
t2
)
{
t1
.
tv_sec
+=
t2
/
1000
;
t1
.
tv_usec
+=
t2
?
(
t2
%
1000
)
*
1000
:
500
;
if
(
t1
.
tv_usec
>
1000000
)
{
t1
.
tv_sec
++
;
t1
.
tv_usec
-=
1000000
;
}
return
t1
;
}
inline
int
operator
>
(
const
timeval
&
t1
,
const
timeval
&
t2
)
{
if
(
t1
.
tv_sec
==
t2
.
tv_sec
)
return
t1
.
tv_usec
>
t2
.
tv_usec
;
return
t1
.
tv_sec
>
t2
.
tv_sec
;
}
#endif
bool
SvpSalInstance
::
CheckTimeout
(
bool
bExecuteTimers
)
bool
SvpSalInstance
::
CheckTimeout
(
bool
bExecuteTimers
)
{
{
bool
bRet
=
false
;
bool
bRet
=
false
;
...
...
vcl/inc/headless/svpinst.hxx
Dosyayı görüntüle @
90067e80
...
@@ -71,7 +71,7 @@ class GenPspGraphics;
...
@@ -71,7 +71,7 @@ class GenPspGraphics;
class
SvpSalInstance
:
public
SalGenericInstance
class
SvpSalInstance
:
public
SalGenericInstance
{
{
timeval
m_aTimeout
;
timeval
m_aTimeout
;
sal_uLong
m_nTimeoutMS
;
sal_uLong
m_nTimeoutMS
;
int
m_pTimeoutFDS
[
2
];
int
m_pTimeoutFDS
[
2
];
// internal event queue
// internal event queue
...
...
vcl/inc/unx/salunx.h
Dosyayı görüntüle @
90067e80
...
@@ -29,15 +29,7 @@
...
@@ -29,15 +29,7 @@
#ifndef _SALUNX_H
#ifndef _SALUNX_H
#define _SALUNX_H
#define _SALUNX_H
// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#include "unx/salunxtime.h"
#if defined LINUX || defined FREEBSD || \
defined NETBSD || defined OPENBSD || defined DRAGONFLY
#include <sys/time.h>
#elif defined AIX
#include <time.h>
#include <sys/time.h>
#include <strings.h>
#endif
#include <unx/svunx.h>
#include <unx/svunx.h>
#include <unx/salstd.hxx>
#include <unx/salstd.hxx>
...
@@ -51,81 +43,6 @@ inline long Divide( long nDividend, long nDivisor )
...
@@ -51,81 +43,6 @@ inline long Divide( long nDividend, long nDivisor )
inline
long
DPI
(
long
pixel
,
long
mm
)
inline
long
DPI
(
long
pixel
,
long
mm
)
{
return
Divide
(
pixel
*
254
,
mm
*
10
);
}
{
return
Divide
(
pixel
*
254
,
mm
*
10
);
}
// -=-= timeval =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
inline
int
operator
>=
(
const
timeval
&
t1
,
const
timeval
&
t2
)
{
if
(
t1
.
tv_sec
==
t2
.
tv_sec
)
return
t1
.
tv_usec
>=
t2
.
tv_usec
;
return
t1
.
tv_sec
>
t2
.
tv_sec
;
}
inline
int
operator
>
(
const
timeval
&
t1
,
const
timeval
&
t2
)
{
if
(
t1
.
tv_sec
==
t2
.
tv_sec
)
return
t1
.
tv_usec
>
t2
.
tv_usec
;
return
t1
.
tv_sec
>
t2
.
tv_sec
;
}
inline
int
operator
==
(
const
timeval
&
t1
,
const
timeval
&
t2
)
{
if
(
t1
.
tv_sec
==
t2
.
tv_sec
)
return
t1
.
tv_usec
==
t2
.
tv_usec
;
return
sal_False
;
}
inline
timeval
&
operator
-=
(
timeval
&
t1
,
const
timeval
&
t2
)
{
if
(
t1
.
tv_usec
<
t2
.
tv_usec
)
{
t1
.
tv_sec
--
;
t1
.
tv_usec
+=
1000000
;
}
t1
.
tv_sec
-=
t2
.
tv_sec
;
t1
.
tv_usec
-=
t2
.
tv_usec
;
return
t1
;
}
inline
timeval
&
operator
+=
(
timeval
&
t1
,
const
timeval
&
t2
)
{
t1
.
tv_sec
+=
t2
.
tv_sec
;
t1
.
tv_usec
+=
t2
.
tv_usec
;
if
(
t1
.
tv_usec
>
1000000
)
{
t1
.
tv_sec
++
;
t1
.
tv_usec
-=
1000000
;
}
return
t1
;
}
inline
timeval
&
operator
+=
(
timeval
&
t1
,
sal_uIntPtr
t2
)
{
t1
.
tv_sec
+=
t2
/
1000
;
t1
.
tv_usec
+=
t2
?
(
t2
%
1000
)
*
1000
:
500
;
if
(
t1
.
tv_usec
>
1000000
)
{
t1
.
tv_sec
++
;
t1
.
tv_usec
-=
1000000
;
}
return
t1
;
}
inline
timeval
operator
+
(
const
timeval
&
t1
,
const
timeval
&
t2
)
{
timeval
t0
=
t1
;
return
t0
+=
t2
;
}
inline
timeval
operator
+
(
const
timeval
&
t1
,
sal_uIntPtr
t2
)
{
timeval
t0
=
t1
;
return
t0
+=
t2
;
}
inline
timeval
operator
-
(
const
timeval
&
t1
,
const
timeval
&
t2
)
{
timeval
t0
=
t1
;
return
t0
-=
t2
;
}
#endif
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/inc/unx/salunxtime.h
0 → 100644
Dosyayı görüntüle @
90067e80
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef _SALUNX_TIME_H
#define _SALUNX_TIME_H
#if defined LINUX || defined FREEBSD || \
defined NETBSD || defined OPENBSD || defined DRAGONFLY
#include <sys/time.h>
#elif defined AIX
#include <time.h>
#include <sys/time.h>
#include <strings.h>
#endif
#include <sal/types.h>
// -=-= timeval =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
inline
int
operator
>=
(
const
timeval
&
t1
,
const
timeval
&
t2
)
{
if
(
t1
.
tv_sec
==
t2
.
tv_sec
)
return
t1
.
tv_usec
>=
t2
.
tv_usec
;
return
t1
.
tv_sec
>
t2
.
tv_sec
;
}
inline
int
operator
>
(
const
timeval
&
t1
,
const
timeval
&
t2
)
{
if
(
t1
.
tv_sec
==
t2
.
tv_sec
)
return
t1
.
tv_usec
>
t2
.
tv_usec
;
return
t1
.
tv_sec
>
t2
.
tv_sec
;
}
inline
int
operator
==
(
const
timeval
&
t1
,
const
timeval
&
t2
)
{
if
(
t1
.
tv_sec
==
t2
.
tv_sec
)
return
t1
.
tv_usec
==
t2
.
tv_usec
;
return
sal_False
;
}
inline
timeval
&
operator
-=
(
timeval
&
t1
,
const
timeval
&
t2
)
{
if
(
t1
.
tv_usec
<
t2
.
tv_usec
)
{
t1
.
tv_sec
--
;
t1
.
tv_usec
+=
1000000
;
}
t1
.
tv_sec
-=
t2
.
tv_sec
;
t1
.
tv_usec
-=
t2
.
tv_usec
;
return
t1
;
}
inline
timeval
&
operator
+=
(
timeval
&
t1
,
const
timeval
&
t2
)
{
t1
.
tv_sec
+=
t2
.
tv_sec
;
t1
.
tv_usec
+=
t2
.
tv_usec
;
if
(
t1
.
tv_usec
>
1000000
)
{
t1
.
tv_sec
++
;
t1
.
tv_usec
-=
1000000
;
}
return
t1
;
}
inline
timeval
&
operator
+=
(
timeval
&
t1
,
sal_uIntPtr
t2
)
{
t1
.
tv_sec
+=
t2
/
1000
;
t1
.
tv_usec
+=
t2
?
(
t2
%
1000
)
*
1000
:
500
;
if
(
t1
.
tv_usec
>
1000000
)
{
t1
.
tv_sec
++
;
t1
.
tv_usec
-=
1000000
;
}
return
t1
;
}
inline
timeval
operator
+
(
const
timeval
&
t1
,
const
timeval
&
t2
)
{
timeval
t0
=
t1
;
return
t0
+=
t2
;
}
inline
timeval
operator
+
(
const
timeval
&
t1
,
sal_uIntPtr
t2
)
{
timeval
t0
=
t1
;
return
t0
+=
t2
;
}
inline
timeval
operator
-
(
const
timeval
&
t1
,
const
timeval
&
t2
)
{
timeval
t0
=
t1
;
return
t0
-=
t2
;
}
#endif // _SALUNX_TIME_H
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/unx/gtk/app/gtkinst.cxx
Dosyayı görüntüle @
90067e80
...
@@ -620,7 +620,6 @@ GenPspGraphics *GtkInstance::CreatePrintGraphics()
...
@@ -620,7 +620,6 @@ GenPspGraphics *GtkInstance::CreatePrintGraphics()
}
}
#if GTK_CHECK_VERSION(3,0,0)
#if GTK_CHECK_VERSION(3,0,0)
#define GTK3_INCLUDED
#include "../../headless/svpinst.cxx"
#include "../../headless/svpinst.cxx"
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment