mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 13:48:59 +00:00
Fix bug 5863:
* beamer.layout: * powerdot.layout: - those provide geometry * BufferParams.cpp: * GuiDocument.cpp: - implement provides("geometry") git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28957 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
32875625c8
commit
5a4e4dec15
@ -17,6 +17,7 @@ SecNumDepth 2
|
|||||||
TocDepth 2
|
TocDepth 2
|
||||||
DefaultStyle Standard
|
DefaultStyle Standard
|
||||||
Provides hyperref 1
|
Provides hyperref 1
|
||||||
|
Provides geometry 1
|
||||||
|
|
||||||
DefaultFont
|
DefaultFont
|
||||||
Family Sans
|
Family Sans
|
||||||
|
@ -13,6 +13,7 @@ Columns 1
|
|||||||
Sides 1
|
Sides 1
|
||||||
Provides url 1
|
Provides url 1
|
||||||
Provides hyperref 1
|
Provides hyperref 1
|
||||||
|
Provides geometry 1
|
||||||
DefaultStyle Standard
|
DefaultStyle Standard
|
||||||
|
|
||||||
DefaultFont
|
DefaultFont
|
||||||
|
@ -1129,7 +1129,8 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
|
|||||||
os << "}\n";
|
os << "}\n";
|
||||||
texrow.newline();
|
texrow.newline();
|
||||||
}
|
}
|
||||||
if (use_geometry || nonstandard_papersize) {
|
if (!tclass.provides("geometry")
|
||||||
|
&& (use_geometry || nonstandard_papersize)) {
|
||||||
odocstringstream ods;
|
odocstringstream ods;
|
||||||
if (!getGraphicsDriver("geometry").empty())
|
if (!getGraphicsDriver("geometry").empty())
|
||||||
ods << getGraphicsDriver("geometry");
|
ods << getGraphicsDriver("geometry");
|
||||||
|
@ -1097,6 +1097,14 @@ void GuiDocument::portraitChanged()
|
|||||||
|
|
||||||
void GuiDocument::setMargins(bool custom)
|
void GuiDocument::setMargins(bool custom)
|
||||||
{
|
{
|
||||||
|
bool const extern_geometry =
|
||||||
|
documentClass().provides("geometry");
|
||||||
|
marginsModule->marginCB->setEnabled(!extern_geometry);
|
||||||
|
if (extern_geometry) {
|
||||||
|
marginsModule->marginCB->setChecked(false);
|
||||||
|
setCustomMargins(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
marginsModule->marginCB->setChecked(custom);
|
marginsModule->marginCB->setChecked(custom);
|
||||||
setCustomMargins(custom);
|
setCustomMargins(custom);
|
||||||
}
|
}
|
||||||
@ -2071,14 +2079,19 @@ void GuiDocument::paramsToDialog()
|
|||||||
fontModule->fontsDefaultCO->setCurrentIndex(n);
|
fontModule->fontsDefaultCO->setCurrentIndex(n);
|
||||||
|
|
||||||
// paper
|
// paper
|
||||||
|
bool const extern_geometry =
|
||||||
|
documentClass().provides("geometry");
|
||||||
int const psize = bp_.papersize;
|
int const psize = bp_.papersize;
|
||||||
pageLayoutModule->papersizeCO->setCurrentIndex(psize);
|
pageLayoutModule->papersizeCO->setCurrentIndex(psize);
|
||||||
setCustomPapersize(psize);
|
setCustomPapersize(!extern_geometry && psize);
|
||||||
|
pageLayoutModule->papersizeCO->setEnabled(!extern_geometry);
|
||||||
|
|
||||||
bool const landscape =
|
bool const landscape =
|
||||||
bp_.orientation == ORIENTATION_LANDSCAPE;
|
bp_.orientation == ORIENTATION_LANDSCAPE;
|
||||||
pageLayoutModule->landscapeRB->setChecked(landscape);
|
pageLayoutModule->landscapeRB->setChecked(landscape);
|
||||||
pageLayoutModule->portraitRB->setChecked(!landscape);
|
pageLayoutModule->portraitRB->setChecked(!landscape);
|
||||||
|
pageLayoutModule->landscapeRB->setEnabled(!extern_geometry);
|
||||||
|
pageLayoutModule->portraitRB->setEnabled(!extern_geometry);
|
||||||
|
|
||||||
pageLayoutModule->facingPagesCB->setChecked(
|
pageLayoutModule->facingPagesCB->setChecked(
|
||||||
bp_.sides == TwoSides);
|
bp_.sides == TwoSides);
|
||||||
|
Loading…
Reference in New Issue
Block a user