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
ac9f72d9
Kaydet (Commit)
ac9f72d9
authored
Ara 05, 2011
tarafından
David Tardon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add support for printing selections
üst
62fd44a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
13 deletions
+52
-13
salprn-gtk.cxx
vcl/unx/gtk/gdi/salprn-gtk.cxx
+52
-13
No files found.
vcl/unx/gtk/gdi/salprn-gtk.cxx
Dosyayı görüntüle @
ac9f72d9
...
@@ -122,7 +122,7 @@ private:
...
@@ -122,7 +122,7 @@ private:
void
impl_initDialog
();
void
impl_initDialog
();
void
impl_initCustomTab
();
void
impl_initCustomTab
();
void
impl_initPrint
Range
(
);
void
impl_initPrint
Content
(
uno
::
Sequence
<
sal_Bool
>
const
&
i_rDisabled
);
void
impl_readFromSettings
();
void
impl_readFromSettings
();
void
impl_storeToSettings
()
const
;
void
impl_storeToSettings
()
const
;
...
@@ -489,7 +489,6 @@ GtkPrintDialog::GtkPrintDialog(vcl::PrinterController& io_rController)
...
@@ -489,7 +489,6 @@ GtkPrintDialog::GtkPrintDialog(vcl::PrinterController& io_rController)
assert
(
m_pWrapper
->
supportsPrinting
());
assert
(
m_pWrapper
->
supportsPrinting
());
impl_initDialog
();
impl_initDialog
();
impl_initCustomTab
();
impl_initCustomTab
();
impl_initPrintRange
();
impl_readFromSettings
();
impl_readFromSettings
();
}
}
...
@@ -544,6 +543,7 @@ GtkPrintDialog::impl_initCustomTab()
...
@@ -544,6 +543,7 @@ GtkPrintDialog::impl_initCustomTab()
rtl
::
OUString
aText
;
rtl
::
OUString
aText
;
rtl
::
OUString
aPropertyName
;
rtl
::
OUString
aPropertyName
;
uno
::
Sequence
<
rtl
::
OUString
>
aChoices
;
uno
::
Sequence
<
rtl
::
OUString
>
aChoices
;
uno
::
Sequence
<
sal_Bool
>
aChoicesDisabled
;
uno
::
Sequence
<
rtl
::
OUString
>
aHelpTexts
;
uno
::
Sequence
<
rtl
::
OUString
>
aHelpTexts
;
sal_Int64
nMinValue
=
0
,
nMaxValue
=
0
;
sal_Int64
nMinValue
=
0
,
nMaxValue
=
0
;
sal_Int32
nCurHelpText
=
0
;
sal_Int32
nCurHelpText
=
0
;
...
@@ -552,6 +552,7 @@ GtkPrintDialog::impl_initCustomTab()
...
@@ -552,6 +552,7 @@ GtkPrintDialog::impl_initCustomTab()
sal_Bool
bUseDependencyRow
=
sal_False
;
sal_Bool
bUseDependencyRow
=
sal_False
;
sal_Bool
bIgnore
=
sal_False
;
sal_Bool
bIgnore
=
sal_False
;
GtkWidget
*
pGroup
=
NULL
;
GtkWidget
*
pGroup
=
NULL
;
bool
bGtkInternal
=
false
;
for
(
int
n
=
0
;
n
!=
aOptProp
.
getLength
();
n
++
)
for
(
int
n
=
0
;
n
!=
aOptProp
.
getLength
();
n
++
)
{
{
...
@@ -566,6 +567,8 @@ GtkPrintDialog::impl_initCustomTab()
...
@@ -566,6 +567,8 @@ GtkPrintDialog::impl_initCustomTab()
rEntry
.
Value
>>=
aCtrlType
;
rEntry
.
Value
>>=
aCtrlType
;
else
if
(
rEntry
.
Name
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"Choices"
)))
else
if
(
rEntry
.
Name
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"Choices"
)))
rEntry
.
Value
>>=
aChoices
;
rEntry
.
Value
>>=
aChoices
;
else
if
(
rEntry
.
Name
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"ChoicesDisabled"
)))
rEntry
.
Value
>>=
aChoicesDisabled
;
else
if
(
rEntry
.
Name
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"Property"
)))
else
if
(
rEntry
.
Name
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"Property"
)))
{
{
beans
::
PropertyValue
aVal
;
beans
::
PropertyValue
aVal
;
...
@@ -617,6 +620,9 @@ GtkPrintDialog::impl_initCustomTab()
...
@@ -617,6 +620,9 @@ GtkPrintDialog::impl_initCustomTab()
}
}
}
}
if
(
aPropertyName
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"PrintContent"
)))
bGtkInternal
=
true
;
if
(
aCtrlType
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"Group"
))
||
!
pCurParent
)
if
(
aCtrlType
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"Group"
))
||
!
pCurParent
)
{
{
pCurTabPage
=
gtk_vbox_new
(
FALSE
,
12
);
pCurTabPage
=
gtk_vbox_new
(
FALSE
,
12
);
...
@@ -637,6 +643,15 @@ GtkPrintDialog::impl_initCustomTab()
...
@@ -637,6 +643,15 @@ GtkPrintDialog::impl_initCustomTab()
pCurSubGroup
=
lcl_makeFrame
(
pCurParent
,
aText
,
aHelpTexts
,
NULL
);
pCurSubGroup
=
lcl_makeFrame
(
pCurParent
,
aText
,
aHelpTexts
,
NULL
);
gtk_box_pack_start
(
GTK_BOX
(
pCurTabPage
),
pCurSubGroup
,
FALSE
,
FALSE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
pCurTabPage
),
pCurSubGroup
,
FALSE
,
FALSE
,
0
);
}
}
// special case: we need to map these to controls of the gtk print dialog
else
if
(
bGtkInternal
)
{
if
(
aPropertyName
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"PrintContent"
)))
{
// What to print? And, more importantly, is there a selection?
impl_initPrintContent
(
aChoicesDisabled
);
}
}
else
if
(
bIgnoreSubgroup
||
bIgnore
)
else
if
(
bIgnoreSubgroup
||
bIgnore
)
continue
;
continue
;
else
else
...
@@ -814,11 +829,24 @@ GtkPrintDialog::impl_initCustomTab()
...
@@ -814,11 +829,24 @@ GtkPrintDialog::impl_initCustomTab()
void
void
GtkPrintDialog
::
impl_initPrint
Range
(
)
GtkPrintDialog
::
impl_initPrint
Content
(
uno
::
Sequence
<
sal_Bool
>
const
&
i_rDisabled
)
{
{
if
(
!
m_pWrapper
->
supportsPrintSelection
())
SAL_WARN_IF
(
i_rDisabled
.
getLength
()
!=
3
,
"vcl.gtk"
,
"there is more choices than we expected"
);
if
(
i_rDisabled
.
getLength
()
!=
3
)
return
;
return
;
GtkPrintUnixDialog
*
const
pDialog
(
GTK_PRINT_UNIX_DIALOG
(
m_pDialog
));
// XXX: This is a hack that depends on the number and the ordering of
// the controls in the rDisabled sequence (cf. the intialization of
// the "PrintContent" UI option in SwPrintUIOptions::SwPrintUIOptions,
// sw/source/core/view/printdata.cxx)
if
(
m_pWrapper
->
supportsPrintSelection
()
&&
!
i_rDisabled
[
2
])
{
m_pWrapper
->
print_unix_dialog_set_support_selection
(
pDialog
,
TRUE
);
m_pWrapper
->
print_unix_dialog_set_has_selection
(
pDialog
,
TRUE
);
}
beans
::
PropertyValue
*
const
pPrintContent
(
beans
::
PropertyValue
*
const
pPrintContent
(
m_rController
.
getValue
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"PrintContent"
))));
m_rController
.
getValue
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"PrintContent"
))));
...
@@ -826,17 +854,28 @@ GtkPrintDialog::impl_initPrintRange()
...
@@ -826,17 +854,28 @@ GtkPrintDialog::impl_initPrintRange()
{
{
sal_Int32
nSelectionType
(
0
);
sal_Int32
nSelectionType
(
0
);
pPrintContent
->
Value
>>=
nSelectionType
;
pPrintContent
->
Value
>>=
nSelectionType
;
if
(
nSelectionType
==
2
)
GtkPrintSettings
*
const
pSettings
(
getSettings
());
GtkPrintPages
ePrintPages
(
GTK_PRINT_PAGES_ALL
);
switch
(
nSelectionType
)
{
{
GtkPrintUnixDialog
*
const
pDialog
(
GTK_PRINT_UNIX_DIALOG
(
m_pDialog
));
case
0
:
m_pWrapper
->
print_unix_dialog_set_support_selection
(
pDialog
,
TRUE
);
ePrintPages
=
GTK_PRINT_PAGES_ALL
;
m_pWrapper
->
print_unix_dialog_set_has_selection
(
pDialog
,
TRUE
);
break
;
case
1
:
GtkPrintSettings
*
const
pSettings
(
getSettings
());
ePrintPages
=
GTK_PRINT_PAGES_RANGES
;
m_pWrapper
->
print_settings_set_print_pages
(
pSettings
,
GTK_PRINT_PAGES_SELECTION
);
break
;
m_pWrapper
->
print_unix_dialog_set_settings
(
pDialog
,
pSettings
);
case
2
:
g_object_unref
(
G_OBJECT
(
pSettings
));
if
(
m_pWrapper
->
supportsPrintSelection
())
ePrintPages
=
GTK_PRINT_PAGES_SELECTION
;
else
SAL_INFO
(
"vcl.gtk"
,
"the application wants to print a selection, but the present gtk version does not support it"
);
break
;
default
:
SAL_WARN
(
"vcl.gtk"
,
"unexpected selection type: "
<<
nSelectionType
);
}
}
m_pWrapper
->
print_settings_set_print_pages
(
pSettings
,
ePrintPages
);
m_pWrapper
->
print_unix_dialog_set_settings
(
pDialog
,
pSettings
);
g_object_unref
(
G_OBJECT
(
pSettings
));
}
}
}
}
...
...
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